[REBOL] Re: Windows "Uptime" API

2002-03-13 Thread Andrew Martin

>You don't mention what version of REBOL is requird for this script.

Rebol/Command is required.

Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Serial Communications - GPS Sings!

2002-03-13 Thread Jim

Dear Steve,

Yes it's Jim.
I am in Canada, just west of Toronto.
Somewhere near N43 39.015 W79 53.247 according to My Garmin
Not exactly your neighbourhood, but close enough in global terms.
I have a Garmin II+ by the way. Super reliable machine even after it
drops off your car roof at 60mph.
I basically have this interest in putting this technology to some higher
use beyond the single user concept that an un-networked gps traps us in.
Essentially, I would like to see the evolution of a "resource discovery"
mechanism tied to location.
In real terms I would expect people to take their antiquated phone
directories and maps to the recycling depot and forget they existed. In
their place we would have a location aware system that could be
interrogated for specific resources based upon user input. The emphasis
is on the individual controlling his "view" based upon his needs and or
preferences.
Imagine that we have thematic data layers that have a geographic
location component. Without limiting my description you could have all
manner of things whether they are stores, restaurants, gas stations,
recreation areas, etc. Beyond that you would have other elements that
have a limited temporal existence. These could be seasonal sports
venues, parks, garage sales, virtual car lots, auctions, specific movies
and theatrical presentations, etc.  You get the idea?  "Data" would have
a lifespan and a geographical sphere of influence. In this context
"data" would become invisible beyond the temporal as well as geographic
extent of these elements. The data would be distributed based upon
geography. Servers would have an index of active themes so that they
could resolve requests with a nul response or the results of a search.

So we would have these imaginary users either stationary or mobile
creating these geographic "clouds" around themselves that contain their
needs and or requests. A fixed location user may have an interst in
antique cars and anti-globalization rallies within 100 miles of his
defined location (home perhaps). So he creates his cloud and populates
it with his preferences and fowards it to the server which then decides
that this is a low frequency request and processes it accordingly. On
the other hand we have Billy Bob who knows that Valentines Day is coming
and his wife who is a large lady likes bon bons and lingerie. So Billy
Bob turns on his gps enabled wireles PDA and builds his cloud and makes
it active for the period while he is driving home. The server sees that
Billy Bob is moving and processes his request based upon his ground
speed and direction in real time to build a reciprocal response that
lists confectioners and lingerie stores for big girls along his path.

Naturally there are many ways to organize the data. I was leaning
towards the concept of interleaving the longitude and lattitude and
storing the elements in that order. The data would have a nested raster
layout that could be examined by traversing the data along the boundries
of the cells formed by lat/long  pairs at various resolutions. Where no
date exists there is no expense in storage as well as the data being
self organizing. I am familiar with other methods of structuring the
data, including Voronoi indexes and whatnot but this seems to be a quick
and dirty solution, not to mention the fact that "Terra Server" uses
this method.


Well that is a crude and general view of what interests me and why I am
hovering around Rebol as a solution. On a phylisophical level I would
like to see a more rational use of the resources that exit in the "wild"
and encourage the public at large to drive less to find what it is that
they really need. Searching for things on a scale of 1:1 with a car in
traffic is not my idea of a progressive future. By giving people a birds
eye view of the world with 20:20 vision would in my estimation turn the
whole concept of premium road front property on its' ear and with luck
make billboards and vulgar displays of road signage obsolete. I keep
wishing...


Sincerely,

Jim

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Class object inheritance library interest ?

2002-03-13 Thread Christian Morency

Hi Rebolers,

Short version :
Anybody interested in helping for this kind of library ? email me privately
at: to-email rejoin ["chrismorency" "@" "videotron.ca"]

Long version :
For the past few months, I've been working on a class object inheritance
library for Rebol. I've been through several implementations,
reimplementations, complete rewrites simply to make sure the library would
be the simpliest to understand by most rebol beginners !

The library currently provides metaclass creation, class creation, object
interface, instances, inheritance, super class, etc. It provides two basic
methods : subclass and new. Yet it is pretty small AFAIK : 23kb including a
13.6kb object/analyser script that could be reused outside the library.
(take in consideration that methods and arguments have long naming scheme in
order to keep the code clear.)

The biggest challenge and most important requirement was to keep instances,
class and metaclass true the way objects are called under Rebol while
changing the way methods and variables are inherited or instanciated...

For exemple, as a developer, you would still use class/new and
instance/do-something etc. Everything would be transparent, however your
method, unless overwritten, would be implemented once (or maybe not *EG*).

I'm now at the point where I think I need some input from some fellow
rebolers (2-3), I begin to have a critical view upon my own work which
brings me to a destructive behavior with it... I even begin to wonder if it
is of any worth to bring a classic OOP behavior to REBOL.

I especially need input from people who are familiar with implementing OOP
languages. Although I daily work in OOP under Smalltalk, I never implemented
a language before... and this rebol-like dialect is my first attempt. I
would like the library to feel like smalltalk while staying true to Rebol.
Why ? Basically I like OOP, I like SmallTalk and I like Rebol too but I'm
not too fond of the current rebol object/inheritence implementation !

I know this library is a long way from release. Eventually, once the core of
it is completed, I will require more people to work on the basic
Object/Behavior/Class/Collection kernel. The kernel should feature most of
current Rebol functions and datatypes, but within an Object/Class
hierarchy... After that, I have begun thinking about object inspectors,
etc... but that is another task ;)

Best,
Chris


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Windows "Uptime" API

2002-03-13 Thread Charles

   You don't mention what version of REBOL is requird for this script.
>> cliks: make routine! [
[
[  return: [integer!]
[] kern32 "GetTickCount"
** Script Error: Feature not available in this REBOL

   Just as a general note, could people include something that states what
version of REBOL is required to run their scripts?

- Original Message -
From: "Terry Brownell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 5:53 AM
Subject: [REBOL] Windows "Uptime" API


>
> While were on the api thing, here's one that gives the system uptime in
hours...
>
> rebol []
>
> kern32: load/library %kernel32.dll
>
> cliks: make routine! [
>
>   return: [integer!]
> ] kern32 "GetTickCount"
>
> Uptime: cliks / 1000 / 60 / 60
> print uptime
> halt
>
> TBrownell
>
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL/Zine

2002-03-13 Thread Charles

   Off the top of my head, it sounds like a scope issue.  Just because a
variable exists in the script doesn't mean it exists outside of the script.
Lots of discussion on this.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 10:41 AM
Subject: [REBOL] Re: REBOL/Zine


Hi all, I have a problem:

I wish to interrupt a program when it is running, using something like:

   print "DEBUG: "
   ask

At this point, I want to analyze the variables used by my software,
example:

   DEBUG: print myVar

where myVar is a variable previously defined in the software. But...
Rebol tell me the variable does not exist! I think because this break
(instruction "ask") create a new context, different from the one used
by the program while it is running. What can I do to evaluate the
instructions inserted in the "ask" block?

Thanks!



--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Ti è capitato di cercare un libro e non riuscire a trovarlo?
E' attivo il servizio TrovaLibri di Airbook.it

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=345&d=13-3
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Serial Communications - GPS Sings!

2002-03-13 Thread Steve Shireman

I am curious who you are, I meant to try to contact you earlier when I 
saw this thread, but wasn't sure, is your name Jim?

Is this a Garmin GPS-35 or ?

I happen to reside in Kansas City, MO, across the state line from Garmin.
We have integrated the Garmin GPS into our product line, as well as some 
others...

I have a potential project brewing, and thought, if you are here in the 
Heart of America, well...maybe we could work something out.

Anyway, feel free to contact me:
Steve Shireman

[EMAIL PROTECTED] or [EMAIL PROTECTED]

and we can discuss a few things.  I have written a GPSbot earlier in 
/IOS (well, runs in View, but easier to keep track of in /IOS) which 
uses the GPS-35 unit data

[EMAIL PROTECTED] wrote:

>Dear List, 
>
>Thanks for the pointer/s.
>I'm slugging it out little by little.
>
>I have now managed to pluck an individual NMEA sentence out of the NMEA
>stream and display it on the console. Sending the data somewhere else is
>trivial at this point. For those that care the code below opens the com2
>port in the mode you see as "read only" "line by line" at 4800/8/n/1.
>The subsequent "Dave Harley" while loop checks for data pressence and
>executes a second while loop to validate that the sentences are
>"Geographic Position" sentences and if they are prints the actual data
>that trails after the "$GPGLL" identifier. 
>
>code starts--->
>
> GPS_STREAM: open/read/lines serial://port2/4800/8/none/1
> while [0 <> (length? (NMEA_LINE: first GPS_STREAM))] [if [(GEO_POS:
>find/match NMEA_LINE "$GPGLL,")] [(print GEO_POS)]]
>
>code ends -^
>
>
>My next wish is to pull the data out of the strings and do a "Z
>transform" on the lat/long positions. This is where we interleave the
>two numbers to wash out a bias when storing them in a linear medium such
>as computer memory. When they are stored (depending upon their density)
>they will follow a nested raster chaining pattern if we connected them
>together on the surface of the earth.
>
>Some of you helped withn the interleaving code for that about a year ago
>and I will thank you shortly.
>
>This data was generated by setting the garmin gps in simulation mode and
>setting the speed to 100mph.
>The initial position is where the machine had it's last position fix and
>the destination is Garmin's headquarters in Kansas. So the data points
>are a straight line vector from where I last ran the gps outdoors.
>
>4339.015,N,07953.247,W,051936,A*30
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] [refactoring s-c?]

2002-03-13 Thread pat665

Hi rebollers

Again exploring Ladislav's contexts.html, I have difficulty understanding
the s-c? function. The goal of the s-c? function is to test if two words are
in the same context.

"Two Words WORD1 and WORD2 are bound to the same context, if the expression
(s-c? word1 word2) yields TRUE."

Here (1) is the original version of s-c? and (2) my simplified version. Both
return the same result (3). Something is certainly missing in the simplified
version, but what ? what are the purposes of the 'use and 'reduce in the
original version ?

(1)
;; s-c? function

 undefined?: func [
{determines, if a word is undefined}
word [any-word!]
] [
error? try [error? get/any :word]
]

 s-c?: func [
{Are word1 and word2 bound to the same context?}
word1 [word!]
word2 [word!]
] [
found? any [
all [
undefined? word1
undefined? word2
]
all [
not undefined? word2
same? word1 bind use reduce [word1] reduce [
'first reduce [word1]
] word2
]
]
]
;; the (over?) simplified version

(2)
 sc: func [
{Are word1 and word2 bound to the same context?}
word1 [word!]
word2 [word!]
] [
  print mold use reduce [word1] reduce ['first reduce [word1]]
found? any [
all [
undefined? word1
undefined? word2
]
all [
not undefined? word2
same? word1 first bind [word1] word2
]
]
]

;; tests

(3)

 >> o: make object! [a: 1 b: 2]
 >> a: 100
 == 100
 >>
 >> word1: 'a
 == a
 >> word2: second first o
 == a
 >> word3: third first o
 == b

The original s-c? gives :

 >>s-c? word1 word2
 == false
 >>s-c? word1 word3
 == false
 >>s-c? word2 word3
 == true

The simplified version gives

 >>sc word1 word2
 a
 == false
 >>sc word1 word3
 a
 == false
 >>sc word2 word3
 a
 == true

As for the subject of this post, I was just kidding. I'am pretty sure that
Ladislav's code do not need any refactoring.

Patrick

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread Bansard Stephane

Hi Patrick,

Thank you for your answer. I had forgotten the precedence rule! Sorry.
It's why 
>> foreach i t [if (length? i <> 0) [print i]]
** Script Error: length? expected series argument of type: series port tuple
struct
** Near: length? i <> 0

wasn't working.

Best regards,
Stephane


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, all,

Just for the sake of clarification, comparison, and contrast (not for
advocacy -- I suspect that the more one thinks about it the smaller
the differences appear), let me offer corresponding information for
vim.

the current official version of vim (6.0 -- 6.1 is still considered
beta).


Chris wrote:
> 
> Emacs-21.1 is the latest (and best) version of Emacs, you can
> obtain it from
> 
> ftp://ftp.gnu.org/gnu/windows/emacs/21.1/emacs-21.1-fullbin-i386.tar.gz
>

Vim 6.0 is the latest user release (6.1 is beta as of this note),
and is available from many mirrors, including

ftp://ftp.us.vim.org/pub/vim/

>
> The file is about 16Mb, winzip can understand the tar.gz - you
> just need to unpack it somewhere on your system and run
> emacs-21.1\bin\emacs.exe
>

IIRC you can get everything in one file, for example on w32,

ftp://ftp.us.vim/org/pub/vim/pc/gvim60.exe

which is about 3.5 Mb.  Download and execute it to start the install.

>
> For an example of the different between emacs an vim, take your
> recent cut and paste problem. In emacs you just highlight the
> section of text you want to cut and either select "Cut" from the
> Edit menu, or press Ctrl-w (to copy something simply select the text
> - that automagically sticks it in the clipboard). To paste stuff off
> the clipboard, more the cursor to where you want it to go and press
> Ctrl-y or move the mouse over the location you want it to go and press
> the middle mouse button. Copy and paste between other programs via the
> clipboard works as well.
> 

I just did essentially the same thing in gvim 6.0 on my work box running
w2k.  I selected text by dragging across it with the mouse, right
clicked
to get a menu containing "Copy", clicked in a different location, right
clicked to get a menu containing "Paste" et voila...

I could also have used the "Copy" and "Paste" commands from the menu bar
in the gvim window, or I could have set the cursor position with the
mouse
and used keyboard commands

"+Por[p

to put the copied text before the cursor or

"+por]p

to put the text after the cursor.

>
> Emacs also offers multiple buffers visible in a single window,
>

As does vim.

>
> or multiple windows each with multiple buffers (makes working on
> multiple sources easy).
>

Which I've done on a few occasions by simply starting vim twice (or
more).

>
> You can even launch a DOS prompt inside the editor to test your
> code without having to start DOS explicitly (press Alt-X, then
> type 'shell')
> 

Using vim on A Real O/S you can:

- use

:!

  to run a command and then return to vim (this also works on
  wimp-dos), 

- use

control-z

  to suspend vi/vim (if you're using a shell with job control, such
  as ksh), do something else, and then resume vi/vim with the

fg

  commmand,  or

- use

:!

  to suspend vi/vim and run the named shell (such as sh, ksh, etc.)
  then type

exit

  to return to the editing session.

In the latter two cases, of course, you can run anything you want,
whether compiles or whatever.

>
> Loading files is just a matter of selecting Open File.. from the
> file menu
>

Same with gvim

>
> (or pressing Ctrl-C, Ctrl-F)
>

which is equivalent to one of

:e 

or

:browse e

(which brings up the system file-open dialogue) in gvim.

>
> saving is done via the menu of Ctrl-C, Ctrl-S.
>

Via "Save" or "Save as..." in the menu, or simply by

:w

in a buffer that was read from a file, or

:sav

to do the equivalent of "Save as...".

>
> You can also load a directory list (Ctrl-x, Ctrl-d or look in the
> File menu) from which you can load files just by highlighting them
> wiht the mouse (navigattion through the directory tree is also
> possible).
>

See the above description of ":browse e"

> 
> You can switch between buffers by pressing Ctrl and the left mouse
> button to get a list, then select the buffer from the menu.
>

You can select which buffer you want in the current window/frame by
picking it from the "Buffers" menu.

Typing

:e#

switches you to "the other" (most recent) edit buffer for the
individual frame you are in.  If you have two (or more) frames open
in the window, each frame as two buffers that it can switch between
with the above command.

You can also use keyboard commands such as

:#b

(where "#" is a number, not the character "#") to pick which buffer
to display in the current window/frame, or

:#bn

(where, again "#" indicates a number) to pick the buffer that is #
positions next/forward in the (circular) list of buffers.

There are lots of variations, but these make the point that you can
be working on (and viewing) multiple files simultaneously in gvim, and
can move among them quickly using either the mouse/menus or keystrokes.

>
> There are modes for more or less every programming language
> (including rebol),
>

gvim has syntax coloring (with some fairly sophisticated control, see
the March 2002 issue of Linux Magazine for an a

[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread Micael . Gullmes

Hi,

here is a different approach:

>> foreach i t [if not equal? "" trim  i [print i]]
one
two

This will also get rid of lines containing spaces.

hope it helps.

Brgds /Micael


-Ursprungligt meddelande-
Fran: Bansard Stephane [mailto:[EMAIL PROTECTED]]
Skickat: den 13 mars 2002 17:39
Till: [EMAIL PROTECTED]
Amne: [REBOL] getting rid of empty string in a block.


Hi all,

I want to sort a file by line alphabetic order. It appears it works at once
as I
write an idea ! Rebol is great !
str: copy []
foreach l (sort read/lines %my-file) [append str join l "^/"]

But I haven't thought of blank line which are empty string in the sort
read/lines resulting block.

I try using the string length. But I don't understand the following
evaluations
:

>> t: ["" "" "one" "two"]
>> foreach i t [print length? i]
0
0
3
3
>> foreach i t [if length? i [print i]]


one
two
>> foreach i t [if length? i <> 0 [print i]]
** Script Error: length? expected series argument of type: series port tuple
struct
** Near: if length? i <> 0

>> foreach i t [if (length? to-string i <> 0) [print i]]


one
two



What would be the best solution to get rid of the empty strings ? (or of any
empty values of a block, be they string or of any type? Could you give me a
pointer to the explanation of this in the official doc ?

Many thanks,
Best regards
Stephane





-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, Chris,

Chris wrote:
> 
> The main difference here is that, unless you're using the Version
> Of Emacs For The Psychotically Masocistic (ie: running it in a
> plain tty), you have the option of using a mouse and menu in emacs.
> When I started learning emacs I didn't use the keyboard shortcuts
> - I didn't know most of them. Instead I used the menus: they provide
> access to the options most people need when they're just starting
> to use an editor. With vim you're dropped in at the deep end - you
> either learn the commands quickly, or you get stuck.
> 

Sorry, but not so.  See my other post laying emacs and vim side by
side, but the key point is that gvim *DOES* allow the use of mouse
selection, menu actions, etc...

-jn-

PS:  Maybe it makes my Psychotically Masochistic, but even when using
 gvim in XWindows or w32, I still use the keyboard for most things
instead of having to stop, move my hand to the mouse, wiggle the mouse
around while mashing and releasing buttons, then move my hand back to
the keyboard to continue typing.  In short, I (personal opinion here)
see mice as good for two things:

1)  training wheels for apps I don't use very often, and which
therefore my fingers haven't learned to drive on autopilot, and

2)  apps which actually depend on hand/eye coordination, such as
graphics programs.

When I'm programming or writing text, I usually think much faster
than I can type (or should I say "type much slower than I think" ;-)
and so begrudge the time I have to spend with my hands off of the
keyboard.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread Gregg Irwin

Hi Stephane,

<< What would be the best solution to get rid of the empty strings ? (or of
any
empty values of a block, be they string or of any type? Could you give me a
pointer to the explanation of this in the official doc ? >>

I don't know if this is the best solution, but it's nice and general:

remove-if: func [predicate blk args /local result keep-it][
result: make block! length? blk
repeat el blk [
; Have to use a temp variable here. "if" doesn't like "predicate :el
args"
; inline and putting it in parens breaks the evaluation.
keep-it: not predicate :el args
if keep-it [append/only result :el]
]
return result
]

>> remove-if :empty? ["" "A" "B" "" "C" "D" ""] none
== ["A" "B" "C" "D"]

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread Mike Myers

one way to remove empty strings from a collection is
   difference ["A" ""  "C" "" "E"  ] [""]
but because it is difference, there must be an empty string in the first
collection.

To get around that you can add one then remove all with append or union:
   difference union [""] ["A"  "C" "E" "" "F"   ] [""]
or
  difference union [""] read/lines %some-file.txt  [""]


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread Andrew Martin

Stephane wrote:
> str: copy []
> foreach l (sort read/lines %my-file) [append str join l "^/"]
>
> But I haven't thought of blank line which are empty string in the sort
read/lines resulting block.

str: copy []
foreach Line sort read/lines %my-file [
if not empty? Line [
append str join Line newline
]
]

> >> foreach i t [if length? i <> 0 [print i]]

Try:

foreach i t [if 0 <> length? i [print i]]


Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor/emacs/elisp->rebol

2002-03-13 Thread Lok Yek Soon

At 07:49 AM 3/13/2002 -0900, you wrote:
> >
> > Tim Johnson wrote:
>
>   I flipped a coin (sort of) heads: emacs, tails: vim.
>   Came up tails :>)

I started off with emacs on a Unix environment but soon find out that emacs 
is not
as widespread deployed as vi (some years back), and hence switch to vi.

vim is a natural adoption ..


YekSoon

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Chris

#Wednesday 13 March 2002 13:10# Message from Joel Neely:

> To be fair, I must admit that I've purchased the O'Reilly book
> on GNU Emacs and plan to start (again) trying it out for some
> things.  However, I've never understood why some folks think
> 
> control-x control-f 
> 
> is easier than
> 
> :e 

The main difference here is that, unless you're using the Version Of Emacs 
For The Psychotically Masocistic (ie: running it in a plain tty), you have 
the option of using a mouse and menu in emacs. When I started learning emacs 
I didn't use the keyboard shortcuts - I didn't know most of them. Instead I 
used the menus: they provide access to the options most people need when 
they're just starting to use an editor. With vim you're dropped in at the 
deep end - you either learn the commands quickly, or you get stuck. 

> to open a file, or why
> control-b  control-n  control-p  control-f
> are easier than
> h j k l
> to move left, down, up, and right, respectively.

Can't say I use them at all - I just use the cursor keys ;) 

> That certainly isn't the case today, although it is still the
> case that vi/vim has a much smaller footprint than emacs.

Definately, especially comparing a full install of emacs on
Linux (around 48Mb) to vim (about 400k). 

> AFAICT, both allow you to start doing elementary text editing
> with only about a dozen or so commands, 

Yes, although as I say IMO emacs is easier to start with as the
basic (and some not so basic) options are usually avilable in a 
menu. 

> while emacs has *lots* of modes, having to do with what kind
> of data it assumes you are editing and whether it should be
> doing context-dependent things (and allowing context-dependent
> commands?) based on the kind of data (e.g. c source versus
> lisp source versus English text, etc...)

It's a bit more complex than that, because you have major modes
(which are chosen basedon the type of data in the buffer) and 
minor modes which modify or add functionality to the major mode.
For example, when I load a c file emacs switches to c-mode, but
I can also start hs-minor-mode on top of that (which allows 
blocks of code to be "folded").

Chris
-- 
 .--{ http://www.starforge.co.uk }-. .---.  
=[ Explorer2260, Designer and Coder \=\ P: TexMaker, Draktar  \ 
=[_[ You will obey the corporate masters. ]_]==[ Stack: EEOeOeOeTmTmDD ]
--
Fifth Law of Procrastination:
Procrastination avoids boredom; one never has the feeling that
there is nothing important to do.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Debugging [was REBOL/Zine]

2002-03-13 Thread Ryan Cole

Hi!

"[EMAIL PROTECTED]" wrote:

> Hi all, I have a problem:
>
> I wish to interrupt a program when it is running, using something like:
>
>print "DEBUG: "
>ask
>

You got to be careful here because 'ask takes an argument, and it will
snatch one from the next line if it has to.


>
> At this point, I want to analyze the variables used by my software,
> example:
>
>DEBUG: print myVar

Now 'print is one of the few functions in rebol that does not return a
value, so the above line will cause an error.  The functions you really want
to use for debugging are '?? and 'probe. They both return their argument, so
they are easy to just insert into most places. '?? is a little dum with
anything except simple words, so dont use it with anything that has a "/" or
a ":" in it.

>
>
> where myVar is a variable previously defined in the software. But...
> Rebol tell me the variable does not exist! I think because this break
> (instruction "ask") create a new context, different from the one used
> by the program while it is running. What can I do to evaluate the
> instructions inserted in the "ask" block?
>
> Thanks!
>

My guess is that the original assignment of MyVar is not being evaluated.
Check that this is actually occuring with a 'probe, like so:

probe MyVar: "Im evaluated!"

Contexts should'nt bother you too much unless you play with to-string,
context, or make object!.

Enjoy!  --Ryan

>
> --
> Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f
>
> Sponsor:
> Ti è capitato di cercare un libro e non riuscire a trovarlo?
> E' attivo il servizio TrovaLibri di Airbook.it
>
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=345&d=13-3
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.

--

Note: When sending me email directly, always make sure to include my name
in the message, otherwise my aggressive spam filters may trash it.

Ryan Cole  *  www.iesco-dms.com  *  707-468-5400


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Adding Rebol Icon to the System Tray API

2002-03-13 Thread Gregg Irwin

Hi Terry,

<< It looks possible, but beyond my API understanding... >>

Unless someone knows how to intercept Windows messages from REBOL, you won't
be able to  receive notifications from it. The rest shouldn't be too hard,
though you'd have to load the icon resources and pass the handle to them as
well IIRC.

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread Gregg Irwin

Hi Gabriele,

<< could this be used to open/print PDF files too? (I'll try
it anyway ASAP...) >>

You know, when I posted that last night, the same thought hit me! If the
association is set up correctly, it should. Let me know if it works on your
end, and I'll try it here as well.

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread Gregg Irwin

Hi Phil,

<< However I particularly wanted to copy a file from 1 location to another
on Win98 without having to read the file in in Rebol and writting it back
out again.
This would preserve the date/time stamp. >>

Terry beat me to it. Thanks Terry! I haven't tried those APIs myself, from
REBOL, but they should work just fine.

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: getting rid of empty string in a block.

2002-03-13 Thread pat665

Hi Stéphane

Try this

>> foreach i t [if (length? i) <> 0 [print i]]
one
two

Rebol is smart, but not smart enough to figure out where to stop in that
case : if length? i <> 0

Salut

Patrick


- Original Message -
From: "Bansard Stephane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 5:39 PM
Subject: [REBOL] getting rid of empty string in a block.


> Hi all,
>
> I want to sort a file by line alphabetic order. It appears it works at
once as I
> write an idea ! Rebol is great !
> str: copy []
> foreach l (sort read/lines %my-file) [append str join l "^/"]
>
> But I haven't thought of blank line which are empty string in the sort
> read/lines resulting block.
>
> I try using the string length. But I don't understand the following
evaluations
> :
>
> >> t: ["" "" "one" "two"]
> >> foreach i t [print length? i]
> 0
> 0
> 3
> 3
> >> foreach i t [if length? i [print i]]
>
>
> one
> two
> >> foreach i t [if length? i <> 0 [print i]]
> ** Script Error: length? expected series argument of type: series port
tuple
> struct
> ** Near: if length? i <> 0
>
> >> foreach i t [if (length? to-string i <> 0) [print i]]
>
>
> one
> two
>
> 
>
> What would be the best solution to get rid of the empty strings ? (or of
any
> empty values of a block, be they string or of any type? Could you give me
a
> pointer to the explanation of this in the official doc ?
>
> Many thanks,
> Best regards
> Stephane
>
>
>
>
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor/emacs/elisp->rebol

2002-03-13 Thread Tim Johnson

Hi Joe:
* Joel Neely <[EMAIL PROTECTED]> [020313 05:25]:
> Hi, Tim,
> 
> Tim Johnson wrote:
> > 
> > To advocate for Chris here, I believe that emacs is an easier
> > start than vim...
> >
> 
> To be fair, I must admit that I've purchased the O'Reilly book
> on GNU Emacs and plan to start (again) trying it out for some
> things.  
  
  I have both Learning GNU Emacs and Writing GNU Emacs Extensions.
  I think the elisp is a lot like rebol.

> However, I've never understood why some folks think
> 
> control-x control-f 

  I use some emacs-style keymaps on vim.

> is easier than
> 
> :e 
> 
> to open a file, or why
> 
> control-b  control-n  control-p  control-f

  I use  to turn off search highlights

> are easier than
> 
> h j k l
> 
> to move left, down, up, and right, respectively.
> 
> When I made the conscious decision years ago to learn vi
> instead of emacs, it was solely for the pragmatic reason that
 
  I flipped a coin (sort of) heads: emacs, tails: vim.
  Came up tails :>)

-- 
Tim Johnson <[EMAIL PROTECTED]>
  http://www.alaska-internet-solutions.com
  http://www.johnsons-web.com
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor/download!

2002-03-13 Thread Tim Johnson

Hi Louis:
* Dr. Louis A. Turk <[EMAIL PROTECTED]> [020313 00:34]:
 
> The list server would not send them as attachments.  Would you please send 
> them as attachments again directly to my email address?
  
   Weird. My copy of my post to the list has them right there in the message.
   Hmmm! Maybe that's 'cuz I use mutt. Woof! Woof! Now there's a whole 'nother
   issue. :-)

   Anyway, click here http://www.johnsons-web.com/rebolaux.zip

   Have fun.
   tj
 
-- 
Tim Johnson <[EMAIL PROTECTED]>
  http://www.alaska-internet-solutions.com
  http://www.johnsons-web.com
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] getting rid of empty string in a block.

2002-03-13 Thread Bansard Stephane

Hi all,

I want to sort a file by line alphabetic order. It appears it works at once as I
write an idea ! Rebol is great !
str: copy []
foreach l (sort read/lines %my-file) [append str join l "^/"]

But I haven't thought of blank line which are empty string in the sort
read/lines resulting block.

I try using the string length. But I don't understand the following evaluations
:

>> t: ["" "" "one" "two"]
>> foreach i t [print length? i]
0
0
3
3
>> foreach i t [if length? i [print i]]


one
two
>> foreach i t [if length? i <> 0 [print i]]
** Script Error: length? expected series argument of type: series port tuple
struct
** Near: if length? i <> 0

>> foreach i t [if (length? to-string i <> 0) [print i]]


one
two



What would be the best solution to get rid of the empty strings ? (or of any
empty values of a block, be they string or of any type? Could you give me a
pointer to the explanation of this in the official doc ?

Many thanks,
Best regards
Stephane





-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL/Zine

2002-03-13 Thread [EMAIL PROTECTED]

Hi all, I have a problem:

I wish to interrupt a program when it is running, using something like:

   print "DEBUG: "
   ask

At this point, I want to analyze the variables used by my software,
example:

   DEBUG: print myVar

where myVar is a variable previously defined in the software. But...
Rebol tell me the variable does not exist! I think because this break
(instruction "ask") create a new context, different from the one used
by the program while it is running. What can I do to evaluate the
instructions inserted in the "ask" block?

Thanks!



--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Ti è capitato di cercare un libro e non riuscire a trovarlo?
E' attivo il servizio TrovaLibri di Airbook.it

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=345&d=13-3  
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.




[REBOL] Re: Modal behaviour for a face (or modal face)

2002-03-13 Thread etienne . alaurent

En réponse à Gabriele Santilli <[EMAIL PROTECTED]>:

Hi, Gabriele,

Thank you. I will study this.

Regards

---
Etienne

> Hi Etienne,
> 
> On Tuesday, March 12, 2002, 7:12:15 PM, you wrote:
> 
> EA> What I want is : a modal behaviour for a face; all events in this
> face
> EA> are grabbed by itself and dispatched  toward its sub-faces. All
> events 
> EA> outside this face are ignored.
> 
> It should be sufficient to modify:
> 
> >> print mold get in system/view 'wake-event
> func [port /local event no-btn][
> event: pick port 1
> if none? event [
> if debug [print "Event port awoke, but no event was present."]
> return false
> ]
> either not pop-face [
> do event
> empty? screen-face/pane
> ] [
> either any [pop-face = event/face within? event/offset
> win-offset? pop-face pop-face/size] [
> no-btn: false
> if block? get in pop-face 'pane [
> no-btn: foreach item pop-face/pane [if get in item
> 'action [break/return false] true]
> ]
> if any [all [event/type = 'up no-btn] event/type = 'close]
> [hide-popup]
> do event
> ] [
> if pop-face/action [
> if not find [move time] event/type [hide-popup]
> do event
> ]
> ]
> none? find pop-list pop-face
> ]
> ]
> 
> (Notice that if you create a new one instead of patching it, you
> should install it in system/ports/wait-list/1/awake.)
> 
> Regards,
>Gabriele.
> -- 
> Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
> Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
> 
> -- 
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
> 
> 
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Question: [ searching for answer on GUI speed ]

2002-03-13 Thread Romano Paolo Tenca

Hi,  Gabriele

> Actually, you should say "doesn't interpret the VID code fast
> enough...". :) If you look into the source of LAYOUT, you'll find
> it's doing quite a lot of things. It isn't using PARSE either, so
> all parsing is done in REBOL, not natively. (This is to make some
> of VID features work; I think LAYOUT could be improved anyway.)

??

from the source of layout:

  parse specs [some [thru 'style val:
  parse specs [some [thru 'styles val: [
  if not parse facets vid-rules [error "Invalid args:" start]

Indeed layout parse every line in a forever loop and find the end of every
line without parse.

---
Ciao
Romano




-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Modal behaviour for a face (or modal face)

2002-03-13 Thread Romano Paolo Tenca

Hi Etienne,

 I forgot in the previous answer this refinement of show-popup:

 show-popup/window an-existing-window

you could look at the source of 

system/words/choose

to see how it is used by RT.

---
Ciao
Romano

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, Tim,

Tim Johnson wrote:
> 
> To advocate for Chris here, I believe that emacs is an easier
> start than vim...
>

To be fair, I must admit that I've purchased the O'Reilly book
on GNU Emacs and plan to start (again) trying it out for some
things.  However, I've never understood why some folks think

control-x control-f 

is easier than

:e 

to open a file, or why

control-b  control-n  control-p  control-f

are easier than

h j k l

to move left, down, up, and right, respectively.

When I made the conscious decision years ago to learn vi
instead of emacs, it was solely for the pragmatic reason that
I found vi on more platforms that I was using than emacs.
That certainly isn't the case today, although it is still the
case that vi/vim has a much smaller footprint than emacs.

AFAICT, both allow you to start doing elementary text editing
with only about a dozen or so commands, and both probably have
more esoteric features than I will ever need in my lifetime.
Both are programmable (emacs in lisp, vim in perl -- and I
think I've seen references to a Python extension).  The most
substantial difference that comes to mind is that vi/vim has
only two "modes"

-  command mode:  in which your keystrokes are interpreted as
  commands telling vi/vim to manipulate or
   move within your buffer, and

-  insert mode:  in which your keystrokes are interpreted as
 data to be placed into the buffer;

while emacs has *lots* of modes, having to do with what kind
of data it assumes you are editing and whether it should be
doing context-dependent things (and allowing context-dependent
commands?) based on the kind of data (e.g. c source versus
lisp source versus English text, etc...)

>
>   :set nowrap
> 

I'm glad you mentioned that option, but I guess we should point
out that it makes the contents of the screen scroll horizontally
when moving through lines wider than the window, and some folks
find that distracting.  In addition, it makes *very* deeply
indented lines look like blank lines if you are sitting at the
left-hand margin.  However, as I said, I'm glad you brought it
up because it *IS* another option to consider.

-jn-


-- 
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, Louis, (yet again ;-)

"Dr. Louis A. Turk" wrote:
> 
> >   :set nowrap
> 
> But sometimes I want the lines wrapped, but I don't want the
> wrapped part of the lines skipped when moving the cursor up
> or down.  Why can't I find that perfect editor?
>

I have yet to find an editor that has a fully functional DWIM
command (Do What I Meant  ;-).

Tim's post reminded me that there's one other option to consider
in your long-lines cases (at least if they are caused by use
of tabs to indent source code):

Type the command

:set ts=4

to tell vim that you want tabs to be treated as 4 characters
wide (instead of the default 8).  That often keeps deeper
lines from needing to wrap at all.  If you *REALLY* want to
be kind to yourself (and a REBOL hero ;-) follow that command
by

:set et

(this one's in vim, not vi) which says to expand tabs to the
equivalent number of spaces.  That way you can use the tab
key without fear while composing code, but the result will be
to have spaces inserted for the indentation.  Again, this will
put off line-wrapping a bit longer, but will also maye your
resulting file more consistent for printing/emailing/etc.

-jn-


-- 
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Stopping errors from stopping the program.

2002-03-13 Thread Micael . Gullmes

Hi!

the until command will : "Evaluates a block until it is TRUE."

the "prin {ftp failed: trying again ... }" returns true, so the until will
stop evaluating your code.

I believe the following (non tested) code will work.

until [
if error? try [write web-address read page-url] [
prin {ftp failed: trying again ... }
false
]
]

Brgd /Micael

-Ursprungligt meddelande-
Fran: Dr. Louis A. Turk [mailto:[EMAIL PROTECTED]]
Skickat: den 13 mars 2002 08:27
Till: [EMAIL PROTECTED]
Amne: [REBOL] Stopping errors from stopping the program.


Hi rebols,

How do I stop an error from stopping my program?  I am sending a file to a 
remote server every 10 minutes to update data.  When there is too much 
traffic on the net or the remote server is too slow receiving the file, an 
error occurs which results in my program dying.  I want it to keep trying 
until it succeeds no matter how long that takes.  Here is what I have 
tried, but it doesn't seem to work (that is, errors still stop the program):

until [not error? try [write web-address read page-url] [prin {ftp failed: 
trying again ... }]]

Louis

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: REBOL/Zine

2002-03-13 Thread Allen Kamp


Funny you should mention it, we were just discussing this yesterday.
Look for a new issue by the end of this month!

Any new contributions out there? Send to [EMAIL PROTECTED]

Cheers,

Allen K

http://www.rebolforces.com/zine


- Original Message - 
From: "Coussement Christophe" <[EMAIL PROTECTED]>
To: "'REBOL Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 9:03 PM
Subject: [REBOL] REBOL/Zine


> Any chance to ever see it back ? Jeff ???
> 
> ==chrsitophe
> 
> 
> 
> -- 
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.
> 
> 

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Chris

Dr. Louis A. Turk wrote:


> So, please explain: why do you think emacs is better than vim?  and for 
> what uses would vim be better than emacs?  Also, what version of emacs 
> do you recommend for use with Windows 2000?


To answer your questions in reverse order, Emacs-21.1 is the latest (and 
best) version of Emacs, you can obtain it from

ftp://ftp.gnu.org/gnu/windows/emacs/21.1/emacs-21.1-fullbin-i386.tar.gz

The file is about 16Mb, winzip can understand the tar.gz - you just need to 
unpack it somewhere on your system and run emacs-21.1\bin\emacs.exe

For an example of the different between emacs an vim, take your recent
cut and paste problem. In emacs you just highlight the section of text
you want to cut and either select "Cut" from the Edit menu, or press
Ctrl-w (to copy something simply select the text - that automagically sticks 
it inthe clipboard). To paste stuff off the clipboard, more the cursor
to where you want it to go and press Ctrl-y or move the mouse over the 
location you want it to go and press the middle mouse button. Copy and paste 
between other programs via the clipboard works as well.

Emacs also offers multiple buffers visible in a single window, or multiple 
windows each with multiple buffers (makes working on multiple sources 
easy).You can even launch a DOS prompt inside the editor to test your
code without having to start DOS explicitly (press Alt-X, then type 'shell')

Loading files is just a matter of selecting Open File.. from the file menu 
(or pressing Ctrl-C, Ctrl-F) saving is done via the menu of Ctrl-C, Ctrl-S.
You can also load a directory list (Ctrl-x, Ctrl-d or look in the File menu)
from which you can load files just by highlighting them wiht the mouse 
(navigattion through the directory tree is also possible).

You can switch between buffers by pressing Ctrl and the left mouse button to 
get a list, then select the buffer from the menu. There are modes for more 
or less every programming language (including rebol), configuration of the 
program's options is done via a hierarchical menu system, you can even 
interactively launch internal operations by pressing Alt-X and then typing 
th ecommand (with autocomplete no less) and...

Well really all I can suggest is that you give it a whirl - emacs is one of 
those things you either love or hate. Unlike the shell-only version you 
don't need to memorise all the keyboard commands (and most of the basic ones 
are easy to pick up and remember, mostly Ctrl-combos) and 21.1 is a big
improvement over previous versions.

Chris
-- 
  .--{ http://www.starforge.co.uk }-. .--.
=[ Explorer2260, Designer and Coder \=\ P: TexMaker, ROACH, site \
=[___You_will_obey_your_corporate_masters___]==[ Stack: EETmTmTRRSS-- ]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, again, Louis,

"Dr. Louis A. Turk" wrote:
> 
> I made the files you suggested, and did what you said, and it
> worked.  However, when I place the cursor in the middle of a
> line where I actually want the text to be  inserted, it still
> does not work.  Instead the text is inserted _above_ the line
> ...
>

Aha!  Now I understand (sorry for not thinking of this earlier...)

When you Put text (or Paste, if you prefer) into the buffer, the
text will be Put into the new place at the same "level" that it
it was Yanked.  If you yanked one or more lines in the original
case, then they will be put in as lines.  However, you don't have
to yank whole lines.  If you have a little buffer containing

this is a test
what if I wanted to insert some text
in the middle of a line
like right here, for example?
is that possible?

then you can:

- place the cursor at the beginning of the word "insert"
  on the second line, for example by

1G/ins

  followed by the enter key,

- enter the command

y3w

  to Yank the following three Words,

- enter the command

/here

  followed by the enter key, to move to the word here in the
  fourth line,

- enter the command

P

  to Put the currently-held text into the buffer just in front
  of the cursor -- at which point the buffer looks like this

this is a test
what if I wanted to insert some text
in the middle of a line
like right insert some texthere, for example?
is that possible?

  with the cursor still on the "h" of "here"

- type the lower-case letter "a", a space, and escape, to
  insert a space Ahead of the "h" in "here",

and no line-breaking occurs, because you were dealing with words
instead of lines.

I was doing all of the above using a vim window open beside
my email window while writing.

Now, I just did a little experiment (but remember that I'm on
vim 5.5 at home) where I undid the last changes above, came
back to this email editing window (in Netscape), selected and
copied the phrase "insert some text" from the sample above,
went back to the vim window, placed the cursor on the "h" in
the word "here", and typed

"*P

at which point vim stuck the three words "insert some text"
into the line just as before.

The moral is

If you cut/copy lines, you'll paste lines,
if you cut/copy words, you'll paste words.

I hope that helps.

-jn-

>
> I learn best from printed documentation.  On-line documentation
> is often confusing for a person trying to learn, and is
> generally best used mainly for reference in my opinion.
> 

That is not an uncommon point of view.  Forunately, the on-line
documentation for vim is actually supplied as text files that get
installed with the software, so you actually *can* print those
files off and read them at your leisure.  Some of the tutorials
can be *quite* helpful.

Also, O'Reilly has a good book on vi that includes discussion of
vi clones such as vim and elvis, and there's a New Riders book
by Steve Oualline that is specific to vim and provides a VERY
detailed look at its features.

>
> It is because of you that I am trying vim.
> 

I'm frightened to think that I might be corrupting yet another
generation of programmers!!!  ;-)  Seriously, thanks for the
kind words; as always, my views are only my opinions, which
you are free to use or ignore as you find appropriate.

-jn-

-- 
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Adding Rebol Icon to the System Tray API

2002-03-13 Thread Terry Brownell


It looks possible, but beyond my API understanding... here it is in VB...

http://www.vbsquare.com/api/tip178.html



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] REBOL/Zine

2002-03-13 Thread Coussement Christophe

Any chance to ever see it back ? Jeff ???

==chrsitophe



-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Windows "Uptime" API

2002-03-13 Thread Terry Brownell


While were on the api thing, here's one that gives the system uptime in hours...

rebol []

kern32: load/library %kernel32.dll

cliks: make routine! [
 
  return: [integer!]
] kern32 "GetTickCount"

Uptime: cliks / 1000 / 60 / 60 
print uptime
halt

TBrownell


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Modal behaviour for a face (or modal face)

2002-03-13 Thread Gabriele Santilli

Hi Etienne,

On Tuesday, March 12, 2002, 7:12:15 PM, you wrote:

EA> What I want is : a modal behaviour for a face; all events in this face
EA> are grabbed by itself and dispatched  toward its sub-faces. All events 
EA> outside this face are ignored.

It should be sufficient to modify:

>> print mold get in system/view 'wake-event
func [port /local event no-btn][
event: pick port 1
if none? event [
if debug [print "Event port awoke, but no event was present."]
return false
]
either not pop-face [
do event
empty? screen-face/pane
] [
either any [pop-face = event/face within? event/offset win-offset? pop-face 
pop-face/size] [
no-btn: false
if block? get in pop-face 'pane [
no-btn: foreach item pop-face/pane [if get in item 'action 
[break/return false] true]
]
if any [all [event/type = 'up no-btn] event/type = 'close] [hide-popup]
do event
] [
if pop-face/action [
if not find [move time] event/type [hide-popup]
do event
]
]
none? find pop-list pop-face
]
]

(Notice that if you create a new one instead of patching it, you
should install it in system/ports/wait-list/1/awake.)

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Question: [ searching for answer on GUI speed ]

2002-03-13 Thread SunandaDH

Hi Gabrielle, 

Thanks very much for the suggestions:

 
>  What about:  
>   Style tgl Toggle 15x15 "-" "+" false
>   Style nde Text blue bold font-size 14

I tried a variant on the Toggle, as I need both 'false and 'true settings 
depending on whether a tree branch is open or closed.

  Style tglF Toggle 15x15 "-" "+" false
  Style tglT Toggle 15x15 "-" "+" true

Unfortunately, it speeded the layout by under 1% -- not statistically 
significant, given the jitter. It is less feasible to use a Nde style as the 
attributes (font color, size, etc) vary from node to node.

>   edge copy [] ; why? the copy should not be needed either
>   Do [Append ESINTREE-TEMP ESINTREE-TEMPITEM]

These are definite quality improvements in the code, but make no measurable 
difference in the time to Layout.

>  You should try two approaches:  
>   - face iteration. I'm not saying it is easier but it could be
> faster, and surely takes a lot less memory.

Given you've mentioned memory, it's reminded me that the timings I've done on 
Layout are incredibly erratic.

Where I've quoted a time (or an improvement in timing) it's on a first run in 
a new console session. Five minutes of use in the application can double the 
Layout times.

I've tried 'recycle -- it makes no difference. Recycle/torture (what's it 
meant to do anyway?) tends to hang the application.

>   - directly manipulating faces, and maybe using the draw effect to
> reduce the number of faces (you've got only two per row anyway,
> so it's not a big deal). It is easier than you'd expect, and
> will be much faster (in particular for operations that only
> require moving faces, which will use hardware acceleration).

I'll give it a try!


Thanks again for all the suggestions.
Sunanda.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Joel Neely

Hi, Louis,

"Dr. Louis A. Turk" wrote:
> 
> Except for the paste problem, there is only one thing about vim
> I have found so far that I don't like: when long lines are
> wrapped vim skips the wrapped part of the line completely when
> pressing j or k, and goes to the next line.
>

I completely understand the (minor, I hope) frustration.  When I
have spent lots of time in a word processor (OBTW:  When does a
"word processor" do to words what a "food processor" does with
food?  When it's made by microSoft! ;-) and then get back to
a real text editor, I have to take a moment to retrain my eyes.
But let me see if I can offer a conceptual model that makes all
of this make sense.

>
> Is it possible to change this?
> 

Not AFAIK.  But there's a reason, having to do with the difference
between word processing and text processing (as in editing source
code for programming).  Programmers most often use indentation to
show nesting of structure in source code, which can easily cause a
line to be arbitrarily long (especially if tabs are used for the
indentation, but see below).  Indenting a line more deeply doesn't
change the fact that it is still one line, even if it ends up
wider than the current display window and has to wrap.

The command

j

moves you forward/down one line (as you already know) and

k

moves you backward/up one line.  vi/vim defines "line" in terms
of newline characters, not the display.  If you resize your
window and make it wider, then any "wrapped" lines should reflow
(possibly not needing multiple rows on the display any more).
The reason for sticking with the newline-based definition of
"line" is that locations don't change depending on the current
size of your editing window.  (I don't recall whether Cygwin
lets you resize the console window, but in general vi/vim
makes no assumptions about fixed window sizes.  If you run the
windows binary of gvim, you can resize the window at will.)

For example, if you type

123G

you'll Go to the 123rd line of the file, which location won't
change depending on your window width.

Also, back in the day, it was common for people to use terminals
(e.g. VT 100) with 80-character width, but print to hardcopy
devices (e.g., line printers, DECwriters, etc.) with 132-character
width.  Therefore "line" was viewed as a logical artifact, not
a physical one.

When you turn on line number display in vi/vim, using

:set number

(or the abbreviation

:set nu

in carpel-tunnel-defense mode ;-) the lines are numbered using the
same newline-based strategy, regardless of window width and any
wrapping that may have occurred.  Then if you print your file to
a wider output device with a line-numbering utility (or stretch
your window horizontally), the line numbering won't change.

Finally, you can write macros to do useful things: for example,
if you were turning a plain text file into an HTML table,
with each line containing a single cell's data ...

(and please, nobody point out that this could be done with a
 very small script...  I'm just using a simple example that
 requires no further explanation!  ;-)

... you could write a single-keystroke macro that does the
following, starting on a line of text from the original data:

- insert above the current line a new line containing only



- move down one line (back to the line you started from)

- insert below the current line a new line containing only



- and move to the line following that insertion.

This would leave you positioned on the next (logical) line from
the original data following the one you started from.  Thus you
could hit the macro key several times in succession to enclose
several items in ... pairs.

Of course, you would want this to work the same regardless of
how wide or narrow your terminal was (i.e., whether or not
display-wrapping had occurred), so basing lines on the places
where newlines were found, rather than on temporary display
wrapping, would give you more stable, predictable behavior.


I hope this was of some help...  I always find it easier to
deal with something when I know *why* it was designed the way
it was.  Even if I disagree with the logic, at least I can
understand it, expect what it will do, and use it successfully.

-jn-


-- 
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread Terry Brownell

Copying creates new file info, moving retains the old.

;To copy a file...

kern32: load/library %kernel32.dll

CopyIt: make routine! [
lpExistingFileName  [string!]
lpNewFileName [string!]
bFailIfExists[integer!]
return: [integer!]
] kern32 "CopyFileA"

;CopyIt "C:/original.r" "C:/trash/copy.r" 0

;To move a file...

MoveIt: make routine! [
lpExistingFileName  [string!]
lpNewFileName [string!]
] kern32 "MoveFileA"

;MoveIt "C:/file.r" "D:/file.r"

TBrownell

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 1:18 AM
Subject: [REBOL] Re: Using call with view/pro


> Hi Gregg,
>
> Running executables/batch files works OK.
>
> However I particularly wanted to copy a file from 1 location to another on
Win98 without having to read the file in in Rebol and writting it back out
again.
> This would preserve the date/time stamp.
>
> I am unsure as to what I should pass into file  or is there a
different API
> for this?
>
> Cheers Phil
>
> (I have successfully made a batch file that receieves parameters that does
the job).
>
> === Original Message ===
>
> Hi Phil,
>
> << On Win98 when I run a native command using 'call is it possible to stop
> the MS DOS box being flashed up. >>
>
> Someone had this issue a while back, and calling the API directly solved
it,
> if you're not concerned about portability. Here's an excerpt from an
object
> I use with various API stuff in it:
>
> win-lib: load/library %shell32.dll
>
> execute: make routine! [
> hwndParent  [integer!]
> Operation   [string!]
> File[string!]
> Parameters  [string!]
> Directory   [string!]
> ShowCmd [integer!]
> return: [integer!]
> ] win-lib "ShellExecuteA"
>
> ; Operation values
> ;   "open"
> ;   "print"
> ;   "explore"
> ; ShowCmd values
> ; 0   Hides the window and passes activation to another window.
> ;
> ; 1   Activates and displays a window. If the window is minimized
> ; or maximized, Windows restores it to its original size and
> ; position (same as 9).
> ;
> ; 2   Activates a window and displays it as an icon.
> ;
> ; 3   Activates a window and displays it as a maximized window.
> ;
> ; 4   Displays a window in its most recent size and position. The
> ; window that is currently active remains active.
> ;
> ; 5   Activates a window and displays it in its current size and
> ; position.
> ;
> ; 6   Minimizes the specified window and activates the top-level
> ; window in the system's list.
> ;
> ; 7   Displays a window as an icon. The window that is currently
> ; active remains active.
> ;
> ; 8   Displays a window in its current state. The window that is
> ; currently active remains active.
> ;
> ; 9   Activates and displays a window. If the window is minimized
> ; or maximized, Windows restores it to its original size and
> ; position (same as 1).
>
>
> execute 0 "open" "notepad.exe" "" "" 1
> execute 0 "open" "calc.exe" "" "" 1
>
> HTH!
>
> --Gregg
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread Gabriele Santilli

Hi Gregg,

On Wednesday, March 13, 2002, 6:50:02 AM, you wrote:

GI> ; Operation values
GI> ;   "open"
GI> ;   "print"
GI> ;   "explore"

Gregg, could this be used to open/print PDF files too? (I'll try
it anyway ASAP...)

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Stopping errors from stopping the program.

2002-03-13 Thread Carl Read

On 13-Mar-02, Dr. Louis A. Turk wrote:

> Hi rebols,

> How do I stop an error from stopping my program? I am sending a file
> to a remote server every 10 minutes to update data. When there is
> too much traffic on the net or the remote server is too slow
> receiving the file, an error occurs which results in my program
> dying. I want it to keep trying until it succeeds no matter how long
> that takes. Here is what I have tried, but it doesn't seem to work
> (that is, errors still stop the program):

> until [not error? try [write web-address read page-url] [prin {ftp
> failed: trying again ... }]]

Hi Louis,

Your problem is there's no 'if in the above so the second block isn't
evaluated, yet it is returned to 'until for checking if it's true or
false.  Here's a simplier version which shows what's happening
without the need to access a website...

>> until [not error? try [1 / 0][prin "Error"]]
== [prin "Error"]

This is detecting the error but just shrugging its shoulders about it
and moving on to what's next - which is the block.  (Sorry - it's
late:)

I found it simpliest to use 'either to get it working...

>> until [either error? try [1 / 0][print "Error" false][true]]
Error
Error
Error
Error
(escape)

>> until [either error? try [1 / 1][prin "Error" false][true]] 
== true

HTH.

-- 
Carl Read

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: index.r specifications

2002-03-13 Thread Graham Chiu


> > This might help. http://www.rebol.com/docs/desktop.html
> 

Thanks Allen.  It looks as though the desktop dialect is
incomplete in it's handling of paths above the index.r.

I've changed my CGI script to turn files into urls instead,
and that seems to work.  And the counter works :)

http://www.compkarori.com/cgi-local/index.r

Now to see if I can incorporate a guest book into my index.r
:))

--
Graham Chiu
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Question: [ searching for answer on GUI speed ]

2002-03-13 Thread Gabriele Santilli

Hi Sunanda,

On Tuesday, March 12, 2002, 11:57:20 AM, you wrote:

Sac> different approach, or maybe not Rebol at all. I'm just disappointed that
Sac> Rebol/View doesn't render fast enough for what I consider to be a 
Sac> small/medium application.

Actually, you should say "doesn't interpret the VID code fast
enough...". :) If you look into the source of LAYOUT, you'll find
it's doing quite a lot of things. It isn't using PARSE either, so
all parsing is done in REBOL, not natively. (This is to make some
of VID features work; I think LAYOUT could be improved anyway.)

Sac> Return
Sac> pad 40x0 
Sac> Toggle 15x15 "-" "+" false
Sac>  user-data ["S" "Z1SW" "Esin-Z1-Z1SW"]
Sac> [EsinTree/Toggle face/user-data/3 "Cseb-Tree"] 
Sac> ESINTREE-TEMPITEM: text Blue bold font-size 14
Sac> "Text description of node"
Sac> edge copy []
Sac> user-data ["S" "Z1SW" "Esin-Z1-Z1SW"]
Sac> [esinCseb/LC-Tree-face face]
Sac> do (Append ESINTREE-TEMP ESINTREE-TEMPITEM)

What about:

 Style tgl Toggle 15x15 "-" "+" false
 Style nde Text blue bold font-size 14
 ; ...
 Return
 Pad 40x0
 tgl user-data ["S" "Z1SW" "Esin-Z1-Z1SW"]
 [EsinTree/Toggle face/user-data/3 "Cseb-Tree"]
 ESINTREE-TEMPITEM: nde "Text description of node"
 edge copy [] ; why? the copy should not be needed either
 user-data ["S" "Z1SW" "Esin-Z1-Z1SW"]
 [esinCseb/LC-Tree-face face]
 Do [Append ESINTREE-TEMP ESINTREE-TEMPITEM]
 ; I think you were evaluating ESINTREE-TEMP here...

This might save a little bit of time.

Sac> My basic application problem is that I re-Layout the whole tree every time
Sac> there is a change to it. Maybe (typing aloud here) for _some_ changes, I 
Sac> could update all the individual VID faces -- that'd be messy, but it would 
Sac> mean the faces "above" the change are unaffected.

You should try two approaches:

 - face iteration. I'm not saying it is easier but it could be
   faster, and surely takes a lot less memory.
 - directly manipulating faces, and maybe using the draw effect to
   reduce the number of faces (you've got only two per row anyway,
   so it's not a big deal). It is easier than you'd expect, and
   will be much faster (in particular for operations that only
   require moving faces, which will use hardware acceleration).

Sac> 3. My application implements a "persistant user state". So if the user is
Sac> positioned at the end of the tree view when they exit, that's exactly where 
Sac> they are when they start it up again. Any rendering-on-the-fly code could not 
Sac> (in this instance) assume the application always starts up at the top of the 
Sac> tree -- so incremental rendering can't always be on  a scroll-down, or 
Sac> window-enlarge action.

You could relayout the code as you do now at the start.

My €0.02, ;^)
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread philb

Hi Gregg,

Running executables/batch files works OK.

However I particularly wanted to copy a file from 1 location to another on Win98 
without having to read the file in in Rebol and writting it back out again.
This would preserve the date/time stamp.

I am unsure as to what I should pass into file  or is there a different API 
for this?

Cheers Phil

(I have successfully made a batch file that receieves parameters that does the job).

=== Original Message ===

Hi Phil,

<< On Win98 when I run a native command using 'call is it possible to stop
the MS DOS box being flashed up. >>

Someone had this issue a while back, and calling the API directly solved it,
if you're not concerned about portability. Here's an excerpt from an object
I use with various API stuff in it:

win-lib: load/library %shell32.dll

execute: make routine! [
hwndParent  [integer!]
Operation   [string!]
File[string!]
Parameters  [string!]
Directory   [string!]
ShowCmd [integer!]
return: [integer!]
] win-lib "ShellExecuteA"

; Operation values
;   "open"
;   "print"
;   "explore"
; ShowCmd values
; 0   Hides the window and passes activation to another window.
;
; 1   Activates and displays a window. If the window is minimized
; or maximized, Windows restores it to its original size and
; position (same as 9).
;
; 2   Activates a window and displays it as an icon.
;
; 3   Activates a window and displays it as a maximized window.
;
; 4   Displays a window in its most recent size and position. The
; window that is currently active remains active.
;
; 5   Activates a window and displays it in its current size and
; position.
;
; 6   Minimizes the specified window and activates the top-level
; window in the system's list.
;
; 7   Displays a window as an icon. The window that is currently
; active remains active.
;
; 8   Displays a window in its current state. The window that is
; currently active remains active.
;
; 9   Activates and displays a window. If the window is minimized
; or maximized, Windows restores it to its original size and
; position (same as 1).


execute 0 "open" "notepad.exe" "" "" 1
execute 0 "open" "calc.exe" "" "" 1

HTH!

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: GVIM Editor

2002-03-13 Thread Dr. Louis A. Turk

Tim,

Thanks for all the help and hints.

At 08:11 PM 3/12/2002 -0900, you wrote:
>
>   To advocate for Chris here, I believe that emacs is an easier start
>   than vim.

I'm very interested to hear why Chris likes emacs.  I've not yet decided on 
an editor.

>  Now I've got a thought - perhaps it would be worthwhile
>   for vim users on this list to exchange resources. AND it might be
>   worthwhile for emacs users on this list to exchange resources too.

That is a great idea.

>   Sterling uses Emacs and has written some articles for the webzine
>   that I and friends publish..

Yes, I remember reading one of them.  Sterling, are you out there?  I would 
also like to know why you use emacs?  Would you share your rebol 
programming macros and scripts or whatever you call them with us?

Does Carl use emacs also?


>   I believe a tremendous rebol IDE could be "constructed" from either
>   vim or emacs. AND frankly most IDEs don't accomodate multiple languages
>   in the same session. (Like try loading a perl file into C++ Builder,
>   aargh!)

Yes, a rebol IDE is what I need.  But I would rather see it programmed 
using rebol, so that I can add my own extensions without having to learn 
yet another language.  I just simply don't have time to learn another 
language.  I really don't have enough time to get real good at rebol.  What 
would be nice would be a rebol editor/IDE designed in a simple modular 
fashion and clearly commented so that we could all easily share our 
extensions to it.  We could pick and choose only the extensions that we 
need so that our personal copy of the editor remains small and fast.

One thing I really like about rebol is that it is so easy to install.  And 
to install a script you just copy it to your harddrive and use it.  I don't 
like being tied to any particular operating system.

That's what I would like, but meanwhile I still need an editor.


> > May I please get a copy?
>
>   I am attaching filetype.vim and rebol.vim. I would suggest backing
>   up the originals...

The list server would not send them as attachments.  Would you please send 
them as attachments again directly to my email address?

>
> >
> > Except for the paste problem, there is only one thing about vim I have
> > found so far that I don't like: when long lines are wrapped vim skips the
> > wrapped part of the line completely when pressing j or k, and goes to the
> > next line.  Is it possible to change this?
>
>   :set nowrap

But sometimes I want the lines wrapped, but I don't want the wrapped part 
of the lines skipped when moving the cursor up or down.  Why can't I find 
that perfect editor?  What I really want is an editor that will 
automatically know what I need even when I don't, and will write all the 
code for me without me having to touch the keyboard.  :>)   Have I 
described emacs, Chris?

I appreciate all you guys on this list.  You've all taught me a lot.  Many 
thanks!

Louis






-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] "IOS, another REBOLution"

2002-03-13 Thread Carl Read

A link to this article "IOS, another REBOLution"...

http://www.linuxfocus.org/English/March2002/article230.shtml

has just (I think) appeared on RT's site.  It's new, yes?

-- 
Carl Read

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Stopping errors from stopping the program.

2002-03-13 Thread Dr. Louis A. Turk

Hi rebols,

How do I stop an error from stopping my program?  I am sending a file to a 
remote server every 10 minutes to update data.  When there is too much 
traffic on the net or the remote server is too slow receiving the file, an 
error occurs which results in my program dying.  I want it to keep trying 
until it succeeds no matter how long that takes.  Here is what I have 
tried, but it doesn't seem to work (that is, errors still stop the program):

until [not error? try [write web-address read page-url] [prin {ftp failed: 
trying again ... }]]

Louis

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Macro - function problems

2002-03-13 Thread Robbo1Mark

Hi Romano,

Your solution is a close approxmiation of what Iam
looking for - which is basically a higher order 'MACRO
function which return a function bound to the 'name
argument which when evaluated binds a paren! or 'DOES
function to the first 'SPEC or 'ARGS argument and in
turn substitutes any / all remaining args in the 'SPEC
correctly in the resulting paren! or 'does function 'BODY .

As I said Iam sure it is possible to produce such a macro constructor function which 
even allows for "nested" macros within the 'args or 'body.

Will think more about your solution,

cheers & thanks,

Mark


In a message dated Tue, 12 Mar 2002  7:20:52 PM Eastern Standard Time, "Romano Paolo 
Tenca" <[EMAIL PROTECTED]> writes:

> Hi, Mark
> 
> > My MACRO function takes three arguments
> > which are these
> >
> > 'name [word!] args [block!] body [block!]
> >
> > here are some simple examples of what I mean
> >
> > >> MACRO nil ['word] [set word zero]
> > >> nil b
> > == (set 'b zero)   ; or func [] [set 'b zero]
> > >> source b
> > b: (set 'b zero)   ; or func [] [set 'b zero]
> > >> b
> > == 0
> > >> source b
> > b: 0
> >
> > and another example
> >
> > >> MACRO printer ['word 'value] [print value]
> > >> printer test "Hello"
> > == (print "Hello)  ; or func [] [print "Hello"]
> > >> source test
> > test: (print "Hello") ; or func [] [print "Hello"]
> 
> A solution (not a guru's one) could be:
> 
> macro: func ['w spec body][
>  set :w func spec compose/deep [set get (first spec) does compose/deep
> [(body)]]
> ]
> 
> which must be used with this syntax:
> 
> macro printer ['word 'value] [print (value)]
> 
> The substitution is made by compose, so the 'value must be between parens,
> this limits the use of parens in the body (but there is a workaround:
> (to-paren [])).
> Another more general solution could be a closure func.
> 
> In this example:
> 
> >> MACRO nil ['word] [set word zero]
> > b: (set 'b zero)   ; or func [] [set 'b zero]
> 
> the arg 'word is used twice:
> 
> 1) like the name of word to assign the macro
> 2) like a value in the macro body
> 
> The result is a macro which changes the word which points to itself. I think
> should be better to distingue the two.
> 
> BTW, with my solution, the nil should be:
> 
> macro nil ['word] [set (:word) zero]
> nil 'b
> source b
> b: func [][set 'b zero]
> 
> hope this helps
> 
> ---
> Ciao
> Romano
> 
> 
> 
> -- 
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the 
> subject, without the quotes.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.




[REBOL] Re: Using call with view/pro

2002-03-13 Thread philb

Hi Gregg,

Excellent, I will give it a go  

Cheers Phil


=== Original Message ===

Hi Phil,

<< On Win98 when I run a native command using 'call is it possible to stop
the MS DOS box being flashed up. >>

Someone had this issue a while back, and calling the API directly solved it,
if you're not concerned about portability. Here's an excerpt from an object
I use with various API stuff in it:

win-lib: load/library %shell32.dll

execute: make routine! [
hwndParent  [integer!]
Operation   [string!]
File[string!]
Parameters  [string!]
Directory   [string!]
ShowCmd [integer!]
return: [integer!]
] win-lib "ShellExecuteA"

; Operation values
;   "open"
;   "print"
;   "explore"
; ShowCmd values
; 0   Hides the window and passes activation to another window.
;
; 1   Activates and displays a window. If the window is minimized
; or maximized, Windows restores it to its original size and
; position (same as 9).
;
; 2   Activates a window and displays it as an icon.
;
; 3   Activates a window and displays it as a maximized window.
;
; 4   Displays a window in its most recent size and position. The
; window that is currently active remains active.
;
; 5   Activates a window and displays it in its current size and
; position.
;
; 6   Minimizes the specified window and activates the top-level
; window in the system's list.
;
; 7   Displays a window as an icon. The window that is currently
; active remains active.
;
; 8   Displays a window in its current state. The window that is
; currently active remains active.
;
; 9   Activates and displays a window. If the window is minimized
; or maximized, Windows restores it to its original size and
; position (same as 1).


execute 0 "open" "notepad.exe" "" "" 1
execute 0 "open" "calc.exe" "" "" 1

HTH!

--Gregg

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.