[REBOL] Trim question Re:(2)

2000-10-11 Thread ingo

Once upon a time [EMAIL PROTECTED] spoketh thus:
> > Can someone tell me what makes this fail?
> >
> > >> a: { one two
> > {three four }
> > == " one two^/three four "
> > >> a2: trim/auto copy a
> > == "one two^/   three four "
<...>

As to my understanding it's correct:

trim/auto unindents the first line, and conserves indentation
relative to this line, let's see

>> print trim/auto {abc^/   def}
abc
   def
>> print trim/auto {   abc^/   def}
abc
def
>> print trim/auto {   abc^/  def}
abc
   def

In the first example nothing got changed, because the first
line wasn't indented.
In the second all whitespace got deleted, because the lines
were indented equally,
and in the last example the three spaces that the second line 
was indented deeper were preserved.


I hope that helps,

Ingo




[REBOL] Rebol web servers Re:(2)

2000-10-07 Thread ingo

Hi Jeff,

Once upon a time [EMAIL PROTECTED] spoketh thus:
<...>
There's also (Ingo Hohmann's) YaRWeS (Yet another rebol web
>   server -- did I get that right?) 
<...>

Well, almost ... except it isn't mine, and I don't know
more about it, either


regards,

Ingo




[REBOL] mailing list since 1998 & full names in sender Re:(2)

2000-09-22 Thread ingo

Once upon a time [EMAIL PROTECTED] spoketh thus:
<...> 
> > And... *g* There's one thing I've been missing all the time!
> > Why are there no full names in the sender entry of the mail header???
> 
> You'll recall that before SELMA took over the list, there *were* full 
> names in the header.  Ingo and I discussed the "problem" and even had 
> some solutions; none of mine ever got worked through enough to submit 
> to RT for inclusion in Selma (or REBOL itself).
<...>

Hi Kev, 

my version works for me and got sent to feedback (final version was 
#1467 22/Nov/1999, I think), after that I never heard about it.

Same for help working on path values (#2729 12/Apr/2000).

So I now just enjoy my working system,


best regards,

Ingo




[REBOL] flavors & versions... Re:(3)

2000-09-20 Thread ingo

Hi Pete,

I am using Linux and have all rebol versions installed in different
directies, but with the same rebol_home.

I am using /core /command /view subdirs for my scripts, and use

if rebol/product = 'view [] 

in some scripts,


I hope this helps,

regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
<...> 
> As far as the other files associated with Rebol, how do you handle storage?
> Either I have multiple versions of the same files in different directories, or I
> overwrite a script intended for use with View with one that only works in Core,
> etc. Maybe scripts should have command: core: and view: blocks that only get
> executed depending upon the version of rebol being used... 




[REBOL] problems with series of objects Re:

2000-08-13 Thread ingo

Hi Raimund,

I'll step to your program, and maybe we'll find
out together ...

Once upon a time [EMAIL PROTECTED] spoketh thus:
> I try to have a series of self defined objects and pick one of the objects to
> access it.
> 
> Here is the code I use:
> 
> REBOL []
> 
> book: make object! [
>   author:
> title:
> info: none
> ]

REBOL> help book
object with fields:
author (none) none
title  (none) none
info   (none) none

> book1: make book []
> book1/author: "Fritz the Cat"
> book1/title: "That is the title of book1"
> book1/info: "That is info of book1"

REBOL> help book1
object with fields:
author (string)   "Fritz the Cat"
title  (string)   "That is the title of book1"
info   (string)   "That is info of book1"

Up to now, it seems ok.

> book2: make book []
> book2/author: "Fritz the Cat"
> book2/title: "That is the title of book2"
> book2/info: "That is info of book2"
> 
> my-serie: [book1 book2]

REBOL> help my-serie
MY-SERIE is a block of value: [book1 book2]

You might get uneasy here, let's see what follows.

> this-book: make book []
> 
> this-book: first my-serie

REBOL> help this-book
THIS-BOOK is a word of value: book1

Ahhh, yes. You see, your block contains words, that
by pure coincidence have the same name as your 
objects, but that doesn't mean that they are bound 
to the same values.

To get your "objects" into your block, you have to
reduce it, like

REBOL> my-serie: reduce [book1 book2]
REBOL> help my-serie
MY-SERIE is a block of value: [
make object! [
author: "Fritz the Cat"
title: "That is the title of book1"
info: "That is info of book1"
] 
make object! [
author: "Fritz the Cat"
title: "That is the title of book2"
info: "That is info of book2"
]]

REBOL> this-book: first my-serie
REBOL> print this-book/info 
That is info of book1


I hope this helps

Ingo


PS: Don't assume your help will give you as
much info as you've seen here. This is 
my patched version ...




[REBOL] Browser? Re:(4)

2000-07-21 Thread ingo

Hi Pete,

sorry I'm a bit late, but here are some possible solutions

you could try to
- set view_home=e:\program files\_rebol\View in autoexec.bat
- reinstall into the location it is already installed in


regards,

Ingo

Once upon a time [EMAIL PROTECTED] spoketh thus:
<...>
> Yes, there is a public subdir already there under my View folder. The problem is
> that my View is installed in e:\program files\_rebol\View; for some reason it's
> looking for c:\program files\rebol\View.
> 
> Is there a way to tell View what it's real install path is?
> 
> -- 
> Pete Wason|"LWATPLOTG"|[EMAIL PROTECTED]|[EMAIL PROTECTED]|CUCUG|TA|PHX




[REBOL] How to execute a rebol script from an html page? Re:(2)

2000-07-12 Thread ingo

Hi Tiana,

the script tag really only works if the browser supprts
client-side scripting in rebol, so far I only know of
one bowser that does, this, but it lacks in many other 
regards. 

do http://www.2b1.de/

in Rebol/View will give you a browser that understands

[REBOL] bug ? Re:(3)

2000-07-11 Thread ingo

Hi Daniel,

what exactly _are_ file1 and file2? You are calling them files,
but are you sure they're files? As I see it, the are not. Lessee
what happens here ...

REBOL/Core 2.3.0.4.2 24-Jun-2000
Copyright 2000 REBOL Technologies.  All rights reserved.
>> difference file1 file2
** Script Error: file1 has no value.
** Where: difference file1 file2
>> difference %file1 %file2
== "12"
>> difference "file1" "file2"
== "12"



>> difference file1 file2
== {:1235!"%?RUGHCFT89}

So, 'file1 'file2 are normally just words, that can't be
used for difference, %file1 %file2 work just like strings,
as expected, cause %file1 is a series. 

And now, about my "magic", it was just:

>> file1: {:12374576$!"-&)(/%&)%%%} file2: {)?&/$&()RUGHCFTR(/87694} 

And this may be, what you've done:

file1: read %somefile
file2: read %some_other_file

And then difference worked on the _contents_ of the files,
which were read as series, and referenced as 'file1 / 2


regards,

Ingo



Once upon a time [EMAIL PROTECTED] spoketh thus:
> 
> What I'm saying is that it is not consistent with the philosophy in
> Rebol. Datasets are not a datatype, it is a human convention. Take
> note of the help message : arg must be a series. Files are read as
> series. But yet difference won't work on them.
> Inconsistent.
> 

Quoted from an earlier mail:
> Difference is a high-level function that returns the differences   
> between two datasets. But datasets do not exist in Rebol
> (they're not a datatype), so difference accepts any series including
> strings. However, when you use it on the content of two files (read
> %file), you get a strange result :
 
> >> difference file1 file2
> == {:"39%.@{}!(^^4567)~}




[REBOL] A data inconsistency Re:(13)

2000-07-09 Thread ingo

Hi Anton,

I am sorry, this mail got somehow sorted right at the end ...

Have a look at this transcript ...

>> t1: func [a][if a = 1 [throw make error! "Never use 1, you fool"] 'ok]  
>  
>> t2: func [[catch] a][if a = 1 [throw make error! "Never use 1, you fool"] 'ok]

So, we have to functions, that differ only in the [catch]

>> t1 1
** Throw Error: ** User Error: Never use 1 you fool.
** Where: throw make error! "Never use 1, you fool"

>> t2 1
** User Error: Never use 1, you fool.
** Where: t2 1

You see the difference in the error mmessages? [catch] 
catches all errors in the func, and throws them as if 
they happened at the time of calling, instead of inside
the script. That's handy, if you want to, e.g. validate
function arguments, like seen here, or a C like assert
function ...


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> Oh ho, Ingo !
> 
> Thanks for pointing that out... Just what I want!
> I remember seeing disarm in the dictionary, but I never tried it out until
> now. :-)
> Perhaps we could write a wrapper function that automatically wraps function
> calls.
> Incidentally, what does the special attribute 'catch, mentioned in help func,
> do?




[REBOL] Where's the docs for user-defined-dialects? Re:

2000-07-09 Thread ingo

Hi Tom,

here's a little cursor positioning dialect, I just now
wrote, this is a very simple example, but easier to understand.

REBOL [
   Title: "Cursor positioning dialect"
   author: "Ingo Hohmann"
   email: [EMAIL PROTECTED]
   usage: {
  print cursor2 [ home "My header" pos 13x13 "this starts at 13x13" up 3 "Hey" ]
  print cursor2 [ clear "+" (screen-size/y - 2) "-" "+" "." 
pos 2x1 "|" (screen-size/y - 2) " " "|" "." 
pos 3x1 "+" (screen-size/y - 2) "-" "+" ]
   }
   known-bugs: [
  {positioning problem, can't go to first column in the next row, when at end of 
row
   (try to skip the "." in second example
  }
   ]
]

cursor2: func [ 
   [catch] 
   commands [block!] 
   /local screen-size string arg cnt cmd c 
][
   ; get the size of the screen
   screen-size: (  
  c: open/binary [scheme: 'console]
  prin "^(1B)[7n" 
  arg: next next to-string copy c
  close c
  arg: parse/all arg ";R"
  forall arg [change arg to-integer first arg]
  arg: to-pair head arg
   )
   ; some setup
   string: copy ""
   cmd: func [s][join "^(1B)[" s]
   ; compose, so that () get reduced
   commands: compose bind commands 'screen-size
   ; parse the dialect
   arg: parse commands [
  any [
 'direct set arg string! (append string arg) |
 'home   (append string cmd "H") |
 'kill   (append string cmd "K") |
 'clear  (append string cmd "J") |
 'upset arg integer! (append string cmd [arg "A"]) |
 'down  set arg integer! (append string cmd [arg "B"]) |
 'right set arg integer! (append string cmd [arg "C"]) |
 'left  set arg integer! (append string cmd [arg "D"]) |
 'pos   set arg pair!(append string cmd [arg/x ";" arg/y "H" ]) |
 'del   set arg integer! (append string cmd [arg "P"]) |
 'space set arg integer! (append string cmd [arg "@"]) |
 'move  set arg pair!(append string cmd [arg/x ";" arg/y "H" ]) |
 set cnt integer! set arg string! (append string head insert/dup copy "" arg 
cnt) |
 set arg string! (append string arg)
  ]
   ]
   if not arg [throw make error! "Unable to parse block"]
   ;return string to be printed
   string
]


Once upon a time [EMAIL PROTECTED] spoketh thus:
> Hi,
> 
> The subject says it all. This is the most interesting feature of the
> language and seems to be virtually undocumented. That can't be right can
> it???




[REBOL] Find speed Re:(5)

2000-07-08 Thread ingo

Hi Ladislav,

when using 'select I'd always use different types
for values and keys, then those problems won't
arise.


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
<..> 
> I think, that Select is sometimes not suitable for accessing the
> associative structures. See this:
> 
> Associative: [
> 1 6
> 2 5
> 3 4
> 4 3
> 5 2
> 6 1
> ]
> 
> >> print select associative 5
> 3




[REBOL] Lost mail ...

2000-07-07 Thread ingo

Dear all,

due to a temporary mailserver misconfiguration I lost some
emails today, some maildelivery error message may have been 
sent, too. The problem applies to email sent in the time from
7-Jul-2000/20:00:00+2:00   to   8-Jul-2000/22:00:00+2:00.

I am sorry for any inconvenience this may have caused, (and
email I may have lost, of course :-) If you sent something
especially valuable within that time, feel free to resend to
me ...


regards,

Ingo

--
So what? That's just me, just being!  http://www.2b1.de/
We ARE all ONE  ---   [EMAIL PROTECTED]   ---  We ARE all FREE




[REBOL] HTML Directory listing Re:(2)

2000-07-07 Thread ingo

Hi Keith,

of course you'd be better off, when using either

getlistoffiles: func [dir /local dirlist][
  dirlist ..

or

getlistoffiles: function [dir][dirlist][
  dirlist ..


regarding the appearance of the links, Carl once
proposed, that 'to-file would create a string looking
right for the respective platform, I'm not sure, wether
it already works, but try: append filelist rejoin [to-file dir item]

And last, I think you should use 
dir? join dir item


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> 
> 
> [EMAIL PROTECTED] wrote:
> 
> > Hi, I'm need an HTML listing of all files in a given directory tree (not
> > necessarily starting at the root level).
> >
> > Here's some preliminary code I've written so far while I've been doing other
> > work:
> >
> > starting_directory: %/c/
> >
> > filelist: []
> >
> > getlistoffiles: func [dir][
> > dirlist: read dir
> > foreach item dirlist [
> > either not dir? item [
> > append filelist rejoin [dir item]
> > ][
> > getlistoffiles item
> 
> be carefull with recursions ... your 'dirlist word's gonna be "global" for all
> your "getlistoffiles item" calls. Try:
> 
> getlistoffiles: func [dir][dirlist][
>   dirlist ..
> 
> which will define 'dirlist as a local word to your function 
> 
> 
> >
> > ]
> > ]
> > ]
> >
> > getlistoffiles starting_directory
> >
> > print ["Every file in " starting_directory
> > ""]
> >
> > foreach file filelist [
> > print rejoin ["" file ""]
> > ]
> >
> > print ""
> >
> > ---
> >
> > Once it's working I'm going to write the whole thing I'm just printing to
> > the console now to a file of course.
> >
> > Seems like it should be really simple, but I'm running into some problems.
> > For some reason it isn't "recursing" and getting the subdirectories, and
> > even though I have the "dir?" test in there it's still putting directories
> > in 'filelist. Also, since I'm on Windows, the "file" that I get from the
> > foreach at the bottom isn't good enough to put as an HTML link since it
> > doesn't have the colon in it. i.e. It looks like "file:///c/blahblah"
> > rather than "file:///c:/blahblah"
> >
> 
> Is it a problem? Well, you need to skip first three chars from your file (skip
> file 3) and insert the colon then :-):
> 
> foreach file filelist [
> print rejoin ["" file
> ""]
> ]
> 
> HopeThisHelps :-)
> 
> Cheers,
> -pekr-
> 
> >
> > If anyone could lend any assistance I'd be grateful. And of course if
> > someone's already written a script to do exactly this, if anyone could point
> > me to it it'd be great. Thanks!
> >
> > Keith
> 

--
do http://www.2b1.de/
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] one more time Re:

2000-07-06 Thread ingo

Hi Tom,

yes, I found that, too. rebol _once_again_ uses
libtermcap, instead of libncurses, it's the only
change between 2.2 and 2.3 regarding libraries.

Debian/Gnu Linux on the other hand regards 
libtermcap as outdated, and only supports a 
libc5 version of libtermcap.

SO, what to do now? libncurses is able to act like
libtermcap, so what I did on my system: I created
libtermcap.so.2 as a link to libncurses ... that
works.

libtermcap.so.2 -> /lib/libncurses.so.3.4


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> one more time
> 
> howdy again,
> 
> I'm stumped. Why do I get this with REBOL 2.3.0.4.2:
> 
> error in loading shared libraries: libtermcap.so.2: cannot open shared
> object file: No such file or directory
> 
> and not with 2.2.0.4.2?
> 
> I ran "update", and I'm using the libc6 version...
> does anyone have a clue?
> 
> Thanks in advance,
> 
> -tom
> 

--
    do http://www.2b1.de/
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] to-path curio Re:

2000-07-03 Thread ingo

Hi Brett,

you're definitely into it, finding all traps at once ;-)

path! <> file!  (!!!)

a file! is the representation of a file on some media, 
optionally including the path to where it's located. 
e.g. %/home/ingo/.rebol

a path! on the other hand is the access to words in an
object!, or a function with refinements included, like
load/markup , system/words , etc.

in short, use 

to-file "anz-visa-statement [30-may-2000 27-jun-2000].r"

and be happy. (What you get may be looking a bit funny,
because " ", "[" and "]" get encoded).

BTW, all in all it's not ideal to include characters other
than a-zA-Z1-0 .-_ in filenames, there may be some platforms
where it is not allowed, and they are mostly troublesome 
when not using a gui interface. They are allowed on Linux,
but not thought to be good style (at least by me :-)


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> I was attempting to create a filename like "anz-visa-statement [30-may-2000
> 27-jun-2000].r" using the to-path.
> 
> What I found was:
> >>to-path "astring[anotherstring]"
> == astring/[anotherstring]

--
    do http://www.2b1.de/
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] Random chaos Re:(2)

2000-07-02 Thread ingo

Once upon a time [EMAIL PROTECTED] spoketh thus:
> >- Open Your Mind -<
>
> Quoting from Holger Kruse's message (29-Jun-00 17:57:38).
> 
> h> If connected? cannot determine whether a connection exists then it returns true.
> 
> Odd, I'd say... Wouldn't it be better if it returned false?

I'd say it should return 'none, thus

'true would mean: I'm sure to be connected
'false  : I'm sure not to be connected
'none   : Sorry, your on your own here

Just my few cents,


regards,

Ingo




[REBOL] A data inconsistency Re:(11)

2000-07-01 Thread ingo

Hi Anton, 

it's not as if you can't do this, but you have to
'disarm the error before.

a: func [][
if error? err: try [
;
;code that may produce an error here...
;
return "a nice result here"
][
err: disarm err 
print reform ["error in function a" err/id]
]
]

regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> Hi,
> 
> I disagree with your last statement (at bottom), Gabriele.
> Recently, I wanted to assign 'err in a program like this (it doesn't
> work):
> 
> a: func [][
> if error? err: try [
> ;
> ;code that may produce an error here...
> ;
> return "a nice result here"
> ][print reform ["error in function a" err]]
> ]
> 
> Wouldn't that be nice?
> A view program with code like that in all it's functions would keep
> running when an error occurs,
> but prints out the error message so the user can see what happened and
> inform the programmer.
> Or it could be stored in an error log for later viewing...
> 
> Maybe we could have do/force or try/harder to continue executing code
> after the try block when an error occurs, instead of bailing out to the
> console. I can imagine a program that automatically emails the author
> when errors occur. How about seeing a brief message like this:
> 
> "Error in function blabla: 'doodle is unset. An error report has been
> sent to the author."
<...>

--
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] core 2.3 install woes Re:

2000-07-01 Thread ingo

Hi Tom,

I have the libc6 version running fine on
Debian/Gnu Linux 2.1 libc6, are you sure
you've grabbed the right version? (I'm
only asking, had _that_ error once, too)


regards,

Ingo


Once upon a time [EMAIL PROTECTED] spoketh thus:
> core 2.3 install woes
> 
> howdy guys,
> 
> just tried to upgrade to REBOL/core 2.3. I think it has already
> been mentioned that "upgrade" does not work.  I grabbed the
> libc6 version for linux, and it failed to start because it
> seemed to be looking for a libc5 shared library. I got the old
> library, tried it, and now rebol just crashes.
> 
> Is this a bug, or what's going on? version 2.2 works just fine.


--  _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] Parser seems to have bug - different results on multiple calls. Re:(4)

2000-07-01 Thread ingo

Hi Brett,

maybe this little func 'll show you what's happening ...

test: func [] [
s1: "" 
s2: copy "" 
append s1 "Hi, I'm changed" 
append s2 "I'm not ..." 
source test 
]

>> test
test: func [][
s1: "Hi, I'm changed" 
s2: copy "" 
append s1 "Hi, I'm changed" 
append s2 "I'm not ..." 
source test
]

You see, s1 has literally been changed in the source-code, 
s2 has not. (It's one of the Rebol traps everyone has to
fall into once.)


I hope this helps

Ingo
 

Once upon a time [EMAIL PROTECTED] spoketh thus:
> Thanks Allen. That certainly does work.
> 
> But, now I'm confused. Why is that different to what I had? Or, why didn't I
> get a new empty string each call previously?
> 
> Brett.

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] How's this for frustration... or...NT/CGI/mail prob solved... Re:(5)

2000-06-27 Thread ingo

Hi Galt,

I for one am using 'protect-system as default,
together with my %yamm.r (this will ask me 
whenever a script tries to redefine a protected
value)

I've already found some errors thanks to this.
(And avoided some others.)


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> should 'protect-system be the default for Rebol,
> so beginning users don't hurt themselves?
> I am surprised that so few problems have been
> reported given the number of elements that must
> exist in the system.  I myself have used the word
> 'query when writing sql code.  I suppose the only
> reason I didn't choke on that was that I remembered
> to declare it as a local var so when the func was
> done the original global 'query was still ok.

--
  http://www.2b1.de/Rebol/
    _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] A data inconsistency Re:(12)

2000-06-26 Thread ingo

Hi Gabriele,

I'm a bit late on this one, but here goes ...

Those were the words of [EMAIL PROTECTED]:
<...> 
> Or, context should be made a little more flexible, with the
> ability to add and remove words. Words would no more be added to
> system/words; UNSET would remove a word from its context; words
> not present in any context would simply be left "unbound" (causing
> the error "Word has no value" instead of the current "Word is not
> defined in this context"); when setting an unbound word, it would
> be added to system/words. A refinement could then be added to SET
> to make it possible to add a word to a specific context, so we
> would gain the ability to easily extend objects, too.
<...> 

This would really be great.

>  l> *Armed errors:*
> 
> [...]
> 
>  l> Well, that is one side of reasoning. The other one is, that
>  l> our code should be able to process values. As long as errors
>  l> are armed, they are only "second class" values that cannot be
>  l> handled with normal code without too much complication. OTOH,
>  l> disarmed Error can be handled with usual code. If we introduce
>  l> "second class" values, we may introduce complications too. I
>  l> am pretty sure, that even the Rebol interpreter could be
>  l> simpler and faster without the "second class" values.
> 
> Changing the way ERROR!s work would cause more compatibility
> issues, tough; I'd like to hear from other subscribers what they
> think about this...

I can't say much about the interpreter here, but _I_ think an
error is an error, and as such not subject to normal processing.
I want an error to bang as soon as possible, and if I think I
know how to handle a specific error, I can always use try [].
Maybe a disarmed-error! type would be useful at times, though.

Well, that's my opinion after all,


regards,

Ingo

--
do http://www.2b1.de/
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] teeny-bits-of-time/2 Re:(4)

2000-06-21 Thread ingo

Hi Rodney, Carl,

Those were the words of [EMAIL PROTECTED]:
> Regarding timestamp - of course it would be possible to create
> your own timestamp string from the pieces you want but maybe
> a new refinement on either the time or date value or 'now function
> could be created.  Call it /nonano to retrieve the classic time/date
> stamp. 

NO! Call it /exact, and add the nanosecond only when 
present. Thus normal behaviour wouldn't change, and 
I believe that most applications will want the "normal"
time format.

Just my 2 cent or so ...


regards,

Ingo




[REBOL] using

2000-06-10 Thread ingo

Hi Tim,

this might well be one of the reasons it's not widely
used ;-)

I thought I had resolved this bug, but I'll have another 
look into it, 


thanks,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Hi :
>   I tried it with the rebol site, and it work
> as I would expect, but a script error was generated
> as follows when I used my own site:
> http://www.johnsons-web.com
> ** Script Error: find expected series argument of type: series port bitset.
> ** Where: if all [elem not find elem "://" not find elem "mailto:"] [
> elem: rejoin [url elem]
> ]
> if
> 
> This site has only an email link in it.
> Tim
> At 05:06 PM 6/9/00 +0100, you wrote:
> >Re: [REBOL] using 

[REBOL] using

2000-06-09 Thread ingo

Re: [REBOL] using 

[REBOL] German docs?

2000-06-09 Thread ingo

German docs?

Hi Rebols,

I've been asked if there are any german docs
about Rebol around, though I don't know of any,
maybe some of you have found (or written?) some-
thing?


TIA,

Ingo

--
Ingo Hohmann, [EMAIL PROTECTED], http://www.2b1.de/




[REBOL] Email(Again) Re:

2000-06-08 Thread ingo

Hi,

if Juno uses "standard" nameing, it should be

pop.juno.com
smtp.juno.com

for pop/smtp, respectively. 


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Thanks, ParksGW, but I don't know what my pop and smtp settings should
> be.
> 
>  (I use Juno)
> 
>  pop.Juno.com   or   pop://Juno.com  or something
> else.
> 
> 
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk!  For your FREE software, visit:
> http://dl.www.juno.com/get/tagj.
> 

--
do http://www.2b1.de/
    _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] files Re:

2000-06-08 Thread ingo

It's done via rebol ...

do file.rip

unzips all files.

Those were the words of [EMAIL PROTECTED]:
> I have a question. how do you "unzip" the .rip files?




[REBOL] HTML "pars"ing Re:(3)

2000-06-08 Thread ingo

Thanks Allen,

I added it to the new version, uploaded a few minutes
ago, and while I was at it, I added rebol script support
via the 

[REBOL] Declaring a constant Re:(2)

2000-06-08 Thread ingo

Yes, you can use protect ... but it is not cast in stone,
merely in lava ...

>>  digit-str: "0123456789"
== "0123456789"
>>  protect 'digit-str
>> digit-str: "abcdefg"
** Script Error: Word digit-str is protected, cannot modify.
** Where: digit-str: "abcdefg"
>> append digit-str "abcdefg"
== "0123456789abcdefg"
>> digit-str
== "0123456789abcdefg"


As to my knowledge, there isn't a stone carver in Rebol.

regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> protect 'digit-str
> 
> > How may I set a word to a constant value?
> > as in:
> > digit-str: "0123456789" ;cast in stone, code can't change it
> > TIA
> > -Tim


--
do http://www.2b1.de/
_ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] crlf and newline (was parsing by period and newline) Re:(5)

2000-06-06 Thread ingo

... or you could use the /with refinement

write/with %your-file #"^(0A)"

will convert all all rebol line endings to ascii 10.


I hope this helps,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Hello [EMAIL PROTECTED]!
> 
> On 06-Giu-00, you wrote:
> 
>  F> Sounds good ... but HOW can I FORCE Rebol to write LF back
>  F> (even under Windozze ???)
> 
> You just need to use the /BINARY refinement (e.g. WRITE/BINARY).
> This way the string will be written exactly as it is, without any
> system-dependent conversion.
<..>

--
do http://www.2b1.de/
_ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] HTML "pars"ing Re:

2000-06-06 Thread ingo

Hi Brian,

I've done a little html display script in /View,
I don't know if this will be helpful to you, but
html-parsing is decoupled from the display (based
on features only available in /View, though, and 
no table parsing, yet).

   save %browser.r read http://www.2b1.de/browser.r

or 

   do http://www.2b1.de/ (only in /View will be loaded
  via load-thru)


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Greetings.
> 
> Before I try and solve this for the third time I wanted to throw it out to
> the group and maybe get leads in the right direction.
> 
> What I am trying to do is "parse" HTML code received from a website.  First
> of all I want to remove all HTML tags and secondly I wanted to write a
> function to pull data from an html table based on a row header in the table.

--
do http://www.2b1.de/
    _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|




[REBOL] refinements Re:(9)

2000-05-30 Thread ingo

Hi, just to diversify,

here's my try ...

REBOL [
Title: "Test for refinement propagation" 
]

a: func [ /c "do c" /d "do d" /e "do e" /local x y ] [
either any [ c d e ] [
if c [print "C"]
if d [print "D"]
if e [print "E"]
] [
print "No refinement"
]
exit
]

; get refinements directly from the function to be called 
b: function head clear find copy third :a /local [call ref] [
call: copy [a]
foreach ref first :a [
if refinement? ref [
if not none? get bind to-word ref 'call [ append call to-word ref ]
]
]
    do mold to-path call
]

b
b/a
b/c/d

halt ; ----- end of script ----


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Calling external functions Re:(3)

2000-05-18 Thread ingo

Hi Peter,

I think it's only the naming that confuses you a bit, look
at those to scripts ...

 script1.r -
REBOL [
Script: "script1"
]

printa: func [] [
   print "a"
]
printb: func [] [
   print "b"
]

 script2.r -
REBOL [
Script: "script2"
]

do %script1

printa
printb
 end -

With "do %script1.r" script1.r is evaluated, this doesn't
mean that the functions 'printa 'printb are evaluated, but
that the definitions are bound to these words. 
After that you can use them in script2.r .

If you want to use a script as a library be sure to only
write function/variable/object/... definitions.

You can have as many definitions in a script as you like.


I hope this helps,
if you have more questions, feel free to ask them.

regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> At 15:51 2000-05-18 +0200, you wrote:
> 
> >you must 'do' the file. if you do it the whole file is evaluated
> >
> >try to give each function in a single file
> 
> 
> Hello!
> 
> Are you saying that I have to have only one function in each
> file?!? There must be some way to 'include' a whole script
> and then calling each function separately?
> 
> Best regards,
> Peter Carlsson

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] [REBOL]Finding characters in strings Re:

2000-05-17 Thread ingo

Hi Tim,

this would be my version ...

char-pos: func [str[string!] ch[char!] /local result] [
   either found? result: find/case str ch [index? result][0] 
]  


regards,

Ingo



Those were the words of [EMAIL PROTECTED]:
> Hi:
>   I have written a function to find the matching index
> for a character in a string:
> 
> ;code follows:
> char-pos: func [str[string!] ch[char!] /local result]
> [
>   result: find/case str ch
>   either equal? result none [return 0]
>   [return index? find/case str ch]
> ]
<...>

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Timeouts. Re:

2000-05-16 Thread ingo

Dear Rebolers,

seems there's some demand for a timeout, may I 
suggest to make it possible to snap in a user
defined function that'll be called when the 
timeout occurs? This would make it possible to
end the program controlled, of course you'll
have to pay attention not to start the next
loop there ...


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Dear Rebol-list,
> 
> Hello, I'm having some problems with my Rebol processes, quite often I
> end up with a endless process, taking about 30% of the CPU.
> 
> Shouldn't there be the possibility to set some kind of timeout?
> 
> So the Rebol process will die after a period of seconds that the
> timeout is set to ?

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] [REBOL] [REBOL] Redefining functions with objects Re:(3)

2000-04-12 Thread ingo

Hi Tim,

I haven't closely looked at your code, but a
short notice on ...

Those were the words of [EMAIL PROTECTED]:
> I have probably answered my own question:
> I'm still a newbie, but am pleased to return
> results ->
> ; == consider the following code: the two objects work
> ;  independently. They use the same named methods
> ; op, prn, and close
> ; When I named those methods open, print,and close,
> ;  I got stack overflows, which suggests to me
> ;  that rebol doesn't like me overridding their
> ;  own system functions. 
<...>
> object-one: make object!
> [
>   op: func [] [fp: open/new/write %objone.txt]
>   prn: func [value]
> [append fp value]
>   cls: func[] [close fp]
> ]

When your 'op was named 'open, did you change the line
fp: open/new/write %objone.txt
to
fp: system/words/open/new/write %objone.txt
-
??

otherwise it has called itself, again and again ...


hope this helps,

Ingo
 
--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] CGI problem Re:(6)

2000-04-06 Thread ingo

Hi Rachid,

Those were the words of [EMAIL PROTECTED]:
> Hello,
> 
> > What you _could_ do, is something like
> >
> > #!rebol -cs
> > REBOL[]
> > secure [net quit]
> >
> > This would give all access to files, but none to the web.
> 
> Why would one do that? Can it still process a form? How does this exactly
> limit Rebol?

Well, I just tried to answer the question, in te way I understood
it. I think GET should still be possible, I am not sure about PUT.
(I have written one test cgi up to now, so am not exactly a profi
in this field).

Thinking about it, the better solution would be to add 'secure
to %user.r, know you could be sure, that none of your cgi's ever
sends a mail with your files attached, or something like that ...


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] recommend a REB friendly host Re:(5)

2000-04-05 Thread ingo

Hi Olivier,

I'm not a CGI person, really so I can't be of much help here,
I have a user.r file supplied. 
My first problems were due to a wrong path, and I found about
my home-dir somewhere in the unofficial faq. 

The only things I could add, have you tried the script locally?
Have you ftp'd as ascii (or from another *nix system)?


That's about everything, sorry

Ingo


Those were the words of [EMAIL PROTECTED]:
> I know much more things than you about the server that host my site
> (thor.prohosting.com) because I wrote a CGI script that let me browse the
> filesystem of the server, and view the error log file of the server. But
> this didn't helped me.
> REBOL returns an error code of 1 or 2 when I remotely run it.
> I checked 3 times that I uploaded the BSDI version ("uname -a" says "BSD/OS
> thor.prohosting.com 3.1 BSDI BSD/OS 3.1 Kernel #0: Thu Jan 28 00:02:17 MST
> 1999 [EMAIL PROTECTED]:/usr/src/sys/compile/THOR  i386").
> 
> It seems to me that thor.prohosting.com has a different configuration than
> your server :(
> (my home directory is in /usr/home where yours is in /usr/home2, for
> example).
> 
> Olivier.

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Core Distribution Question Re:

2000-04-05 Thread ingo

Yes, these were exactly my concerns I once tried to express
to Carl, but I didn't succeed well. 

I think the license for the free versions of Rebol should
definitely show this freedom.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> If I write a client-side application using REBOL/Core,
> may I distribute it without requiring users to obtain
> their own copy through rebol.com?
> 
> The Core agreement seems to say "no" in that part about
> non-transferability.  I'm hoping I got this wrong as it
> would put a damper on the distribution of my application.
> 

> 
> Take Java for example.  The runtime can be separated from
> the development environment so they have separate license
> agreements but that is not the case with REBOL since it is
> both the environment and the runtime.  If the answer to my
> question really is "no" then I am disappointed both for the
> viability of my application and for that of REBOL in
> general as it will be difficult for it to overtake Java's
> level of market penetration without changing the agreement.


--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] CGI problem Re:(3)

2000-04-04 Thread ingo

Hi Keith,

Those were the words of [EMAIL PROTECTED]:
> Awesome, thanks. I was not aware of that :) My only remaining question then
> is why "secure [file none]" in my script doesn't work.

The answer is twofold, first secure doesn't allow 'none, 
it should be allow. Second, we are talking CGI here, aren't
we? So whom do you expect to answer the security question?

>> secure [file none]
** Script Error: Invalid argument: none.
** Where: secure [file none]

>> secure [file allow]
REBOL - Security Check:
Script requests permission to lower security level
Yes, allow all, no, or quit? (Y/A/N/Q) 

What you _could_ do, is something like

#!rebol -cs
REBOL[]
secure [net quit]

This would give all access to files, but none to the web.


hope that helps,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Return types Re:(2)

2000-04-04 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> Hi Gisle,
> 
> why should return types be defined for functions?

Just some random thoughts on this:

1) it would be easier to guess what a function does, or how
   to use it:

compare this 

>> help compress  
Compresses a string series and returns it.
Arguments:
data -- Data to compress (any-string)

to this

>> help compress  
Compresses a string series and returns it.
Arguments:
data -- Data to compress (any-string)
Returns:
binary! -- Maybe with some more explanation here

which carries more information for you? How do you
use it correctly?


2) If you change the function some time later it is 
more likely that you don't introduce changes which
would break existing code.


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] recommend a REB friendly host Re:(3)

2000-04-04 Thread ingo

Hi Olivier,

login at http://freeadmin.prohosting.com/ then you'll get
info on where exactly your pages are located.

The following script works for me ...

#!/usr/home2/tobeone/html/rebol/rebol -cs
REBOL [
   Title: "CGI Test Script"
]
print "Content-Type: text/html^/"
print compose [
 
  "CGI Info" 
  
 
 (mold system/options/cgi)
 
 
 
]

I hope this helps,


Ingo

Those were the words of [EMAIL PROTECTED]:
> I'm interested in how you did it because I already have a Prohosting free
> account on thor.prohosting.com.
> 
> I tried to upload rebol and a CGI script but it didn't work.
> Could you tell me in which directory you installed it, and send me a script
> that work ?
> Are you using a user.r file ?
> 
> Olivier

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] my most frequent complaint Re:(2)

2000-04-03 Thread ingo

Hi Brad,

Those were the words of [EMAIL PROTECTED]:
<...> 
> No.  You are correct, hence my complaint.  It wasn't targeted at Rebol, but 
> scripting languages in general.  I'm C/C++programmer, and I constantly have 
> hopes that a scripting language will arise that I can switch to.
<...>

Have you seen pliant? ( http://pliant.cams.ehess.fr/ ) 

I think there is nearly nothing you can't do with it (if you had
good docs, that is). 

It does tcp/ftp/http/smtp/
scripts are compiled when started
can use dlls / be used as dll (there seem to be still some rough edges) 
highly customizable (even the whole syntax)

on the downside:
only Linux / Windows
10 MB on disc
slow on startup
missing docs
default syntax is awful 

but if someone implemented a rebol syntax translator for pliant ;-)


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] [REBOL]Problem with function argument Re:

2000-04-02 Thread ingo

Hi [EMAIL PROTECTED]:

when you do an 'open, you don't get a file!, but a port.
so change your func this way:

fprint: func [fp[port!] value[string!]] [
  either not-equal? fp none   [
  ; thou canst write on a port, just append ...
  append fp value
  append fp newline
  ] [ 
  print value 
  ]
]


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] synchronize files, WAS: Set the file write time Re:

2000-04-01 Thread ingo

Hi Brad,

if you need to set the file time only for this synchronization,
another idea would be to store checksums of all files. And before
uploading check, wether the checksum has changed.

just another idea ...


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> 
> I'm writing and have mostly working a script that syncs files on a local 
> system to a FTP server.  The only remaining problem has to do with the file 
> time.  Ideally, I would like the file write time on the FTP server to be the 
> same as the file I'm uploading.  I have no idea how this would be done.  An 
> acceptable alternative would be to reset the local file time to that of the 
> one I just uploaded.  I already know how to get its time.  If someone would 
> be so kind as to tell me hoe to set the write time of a loca file I would 
> much appreciate it.

--  _     .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Newbie question #2 - Pattern making and using? Re:(9)

2000-03-28 Thread ingo

Hi TB, 

have a look at this one ...

REBOL []

test-cases: [
"I have a fluffy kitty and a black lab" TRUE 
"I have a fluffy kitty and a orange tabby" FALSE 
"Where is my mangy mutt?" False 
"Where can I buy a book on programming REBOL?" False
]

cat: [thru "orange" "tabby" | thru "fluffy" "kitty" ]
dog: [thru "mangy" "mutt" | thru "black" "lab" ] 

rule: [ cat dog | dog cat ] ; to be sure to catch them either way

foreach [str val] test-cases [
prin [ str "(" val ") -> "]
print parse str rule
] 

comment {
My first idea for 'rule was

rule: [ some [ cat (cat-found: true) | dog (dog-found: true) ]

Problems: 
- without them xxx-found: true you couldn't be
  sure, to not catch cat twice (sentence 2).
- a sentence with 'dog and 'cat in this order
  "I have a black lab and a fluffy kitty."
  would first find the kitty, and thus read over
  your dog. I _think_ there was a solution to
  this ...

Note: Parse capabilities have greatly improved in /View,
  and will be part of the next /Core release, too.
}
halt


I hope this helps

Ingo  

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] Function without argument ... Re:

2000-03-14 Thread ingo

Hi Eric,

you could use this ...

Those were the words of [EMAIL PROTECTED]:
> Hi ! 
> 
> Newbie question !!!
> 
> Is it possible to test a lack of argument in a function ? 
> I try things like this but... it doesn't work !

unset!: do [type?]; this defines unset!

tst: func [
{help for tst...}
   x [integer! unset!]; allow unset! values
][ 
   if not value? 'x [ ; test if x has got a value, use '
  ; to get x litarally you'd get en error 
  ; with unset values otherwise
help tst 
exit  ; exit the function
   ]
   print x
]

if you want to use tst without args in a script, you have to
use it at the end of a paren! e.g. (tst) because tst will eat
up everything that follows

>> tst
help for tst...
Arguments:
x --  (integer unset)
>> tst 3
3
>> (tst)
help for tst...
Arguments:
x --  (integer unset)
>> tst "a"
** Script Error: tst expected x argument of type: integer unset.
** Where: tst "a"


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] "{" in strings - workarounds? Re:

2000-03-14 Thread ingo

Hi Volker,

this problem has been found before, when trying to save
history to files, here's a history save function, that 
does it right ...

;
; History save and load by Christoph Mammitzsch
;
save-history: func [
   "Saves system/console/history to file."
   file [ file! ] "the file to save to"
   /local history line subst
][
   history: copy system/console/history
   forall history [
  line: mold first history
  if equal? first line #"{" [
 line: change line #"^""
forall line [
subst: select [
#"^""   "^^^""
#"^/"   "^^/"  
  ;There must be more. I'm sure I forgot something :)
] first line
if not none? subst [
remove line
line: back insert line subst
]
]
change back line #"^""
 line: head line
  ]
  change/only history line
   ]
   history: head history
   write file history
   exit
]

load-history: func [
   "Restores system/console/history from file."
   file [ file! ] "the file to load from"
   /local history
][
   system/console/history: load file
   exit
]


I hope this helps,

Ingo


Those were the words of [EMAIL PROTECTED]:
> my little email-database is crashed.
> Caused by some emails which contained
> unpaired "{".

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Freenet Protocol help needed, was closing port within protocol Re:(4)

2000-03-13 Thread ingo

Hi Gabriele,

thanks for your help so far, I know the "too much work now"
too well myself :-) 

I'll try to play around this a little ... 

Oh, and I'm using Linux.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> [EMAIL PROTECTED] wrote:
<...> 
> Hmm... this is with what OS? Anyway, the ftp protocol open the
> listen port that way... perhaps it works only with:
> 
>open [scheme: 'tcp port-id: 0]
> 
> > Oh, and by the way, yes I am interested to know how to
> > use 'copy refinements (if ever I get it to run ... :-)
> 
> Currently I'm rather busy; perhaps someone from REBOL Tech. can
> give us the right direction?

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Freenet Protocol help needed, was closing port within protocol Re:(2)

2000-03-08 Thread ingo

Hi Gabriele,

I didn't get it to work, I get an error, when I try to open 
the listen port

Trace:  system/words/open (path)
Trace:  tcp://:0 (url)
opening: tcp://:0
** Access Error: Trace:  "Error opening socket" (string)
Trace:  :arg1 (get-word)
Error opening socket listen port.
** Where: read freenet://localhost:1797/Hi

I _think_ I've made the changes right ...

Oh, and by the way, yes I am interested to know how to
use 'copy refinements (if ever I get it to run ... :-)


thank you,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Hello [EMAIL PROTECTED]!
> 
> On 29-Feb-00, you wrote:
> 
>  i> If someone knows what to do about it, please let me know.
> 
> Just some ideas, let me know if it works:
<...> 

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Freenet Protocol help needed, was closing port within protocol Re:(2)

2000-03-06 Thread ingo

Hi Gabriele,

back home, and giving it a try soon ... thank you!

Those were the words of [EMAIL PROTECTED]:
> Hello [EMAIL PROTECTED]!
<...> 
> I think there's no point in using open-proto here, since proxy
> support would need some work below too... anyway, I'm no expert
> here, so... :-)

I just looked into root-protocol, and found 'open / 'open-proto 
were the same, so I thought it'd be a bright idea, to call 
'open-proto, and add my changes in 'open.

<...> 
> I think you can return answer here too (even if returning data
> from insert is not consistent with other protocols)

Was thinking about this, too. Well actually write may behave like
read in freenet protocol (right now), when trying to add a key, 
that's already in the system ...

And by the way, has anyone written an SHA1 algorithm in Rebol?
Current protocol will use encoded keys ...


thanks again,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Unknown script error Re:

2000-03-01 Thread ingo

Hi Brian,

the error seems to be in the ftp protocol implementation. 
Looks to me like Rebol's waiting for a server response, 
that it doesn't get. So it would be after the download is
completed, while closing the connection. 

But you should wait for someone more experienced in 
networking stuff.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> I am trying to author a script to download via ftp.  Yesterday I hurdled the
> problem of getting files bigger than 16 MB by using a function suggested by
> John to "chunk" the files into smaller pieces thus avoiding memory problems.
> 
> Today, I have another problem.  It appears that I cannot transfer too many
> bytes in one batch.  I can transfer hundreds of small files at a time, no
> problem.  I can transfer a single file >100MB, a little slow, but no
> problem.  The problem lies when I transfer 5 files totaling 200+ MB.  I get
> a script error, either after or during (I am not sure on what line it dies)
> the transfer of the last file.  The error reads:
> 
> ** Script Error: find expected series argument of type: series port bitset.
> ** Where: if not find/match/any server-said response
> 
> Funny thing is 1) It looks like the files transferred fine when I look at
> the resulting directory, and 2) the line "if not find/match/any server-said
> response" does not exist anywhere in my script or any other rebol script on
> my system.
> 
> Any clues would again be appreciated.
> 
> Brian
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Freenet Protocol help needed, was closing port within protocol Re:(2)

2000-03-01 Thread ingo

Hi Gabriele,

that looks much better than my solution ...
about pass-thru, I think I don't understand enough to create
my own version of 'copy and friends without help.

Also be warned, I assembled it by looking what another client,
and the server really did, it doesn't work on the 2228 
(snapshot or later?) any more, but I can send the updated 
version, if someone is interested ...


thank you,

Ingo


Those were the words of [EMAIL PROTECTED]:
> [EMAIL PROTECTED] wrote:
> 
> >find-port: func["Find a free port to connect to" /local port-num p] [
> >   port-num: + random  1
> >   while [error? try [p: system/words/open join tcp://: port-num]] [
> >  print "while"
> >  port-num: port-num + 1
> >   ]
> >   system/words/close p
> >   port-num
> >]
> 
> If you want a free listen port, try:
> 
> >> port: open tcp://:0
> >> port/port-id
> == 2891
> 
> (I'll give it a look more deeply later... too few time now. :-)
> 
> Ciao,
> /Gabriele./
> o) .-^-. (--o
> | Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
> | GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
> o----) `-v-' (--o
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Freenet Protocol help needed, was closing port within protocol

2000-02-29 Thread ingo

Hi Gabriele, and others,

think it's best to send my protocol, though it's not
yet working. Remove the 'halt, to get the error.

If someone knows what to do about it, please let me know.


; --- Script starting below this line  ---
REBOL [
   Title:  "REBOL FreeNet Protocol"
   Date:   2000-02-29
   File:   %freenet.r
   Author: "Ingo Hohmann"
   Email:  [EMAIL PROTECTED]
   Version: 0.0.2
   Protocol-name: "Freenet"
   Protocol-version: "1.0"
   Purpose: {
  Read data from / write data to
freenet servers

Implements the Freenet Protocol 1.0
See http://freenet.sourceforge.net/
}
   Usage:   {

read freenet://localhost:10001/My/key
  gets data associated with "My/key"
  from the freenet server running at
  localhost, port 10001

write freenet://localhost:10001/My_key "MyData"
  Adds "MyData", associated with "My_key"
  to freenet server running at
  localhost, port 10001

(ipaddresses should be of the form protocol/data, with
 tcp currently the only supported protocol, it would become
 tcp/ip-address:port
 if the tcp/ part is omitted, I assume tcp myself, but originally
 the addresses above should have been written:

 read freenet://tcp/localhost:10001/My/key
 write freenet://tcp/localhost:10001/My_key "MyData"
)

   }
   History: [
[ 2000-02-29 "Ingo Hohmann" 0.0.2 
{Freenet addresses allowed (freenet://tcp/localhost:10004 will connect
 to localhost over tcp)} ]
[ 2000-02-28 "Ingo Hohmann" 0.0.1 
   {first version} ]
   ]
   KnownBugs: [
  {close port -> I cannot return the data read ... }
   ]
   Category: [web]
]

random/seed now

freenet-protocol: make Root-Protocol [
   Scheme: 'freenet
   protocol: rejoin [system/script/header/protocol-name " " 
system/script/header/protocol-version newline]

   Port-id: 1
   Port-flags: system/standard/port-flags/direct

   open-check: none
   close-check: none

   make-id: func ["Create Message-ID" /local id i chars len] [
  chars: "0123456789abcdef"
  len: length? chars
  id: copy ""
  for i 1 16 1 [
 append id pick chars random len
  ]
  id
   ]

   find-port: func["Find a free port to connect to" /local port-num p] [
  port-num: + random  1
  while [error? try [p: system/words/open join tcp://: port-num]] [
 print "while"
 port-num: port-num + 1
  ]
  system/words/close p
  port-num
   ]

   init: func [
  "Parse URL and/or check the port spec object"
  port "Unopened port spec"
  spec {Argument passed to open or make (a URL or port-spec)}
  /local scheme
   ][
  if url? spec [
if freenet://tcp/ = (copy/part spec 14) [
spec: rejoin [freenet:// copy skip spec 14]
]
net-utils/url-parser/parse-url port spec
  ]
  scheme: port/scheme port/url: spec
  if none? port/host [
 net-error reform ["No network server for" scheme "is specified"]
  ]
  if none? port/port-id [
 net-error reform ["No port address for" scheme "is specified"]
  ]
   ]

   ; unchanged from root-protocol
   open-proto: func [
  {Open the socket connection and confirm server response.}
  port "Initalized port spec"
  /locals sub-port data in-bypass find-bypass bp
   ][
  net-utils/net-log ["Opening tcp for" port/scheme]
  if not system/options/quiet [print ["connecting to:" port/host]]
  find-bypass: func [host bypass /local x] [
 if found? host [
foreach item bypass [
   if all [x: find/match/any host item tail? x] [return true]
]
 ]
 false
  ]
  in-bypass: func [host bypass /local item x] [
 if any [none? bypass empty? bypass] [return false]
 if not tuple? load host [host: form system/words/read join dns:// host]
 either find-bypass host bypass [
true
 ] [
host: system/words/read join dns:// host
find-bypass host bypass
 ]
  ]
  either all [
 port/proxy/host
 bp: not in-bypass port/host port/proxy/bypass
 find [socks4 socks5 socks] port/proxy/type
  ] [
 port/sub-port: net-utils/connect-proxy port
  ] [
 sub-port: system/words/open/lines [ ; --- OPEN is here
scheme: 'tcp
host: either all [port/proxy/type = 'generic bp] [port/proxy/host] 
[port/proxy/host: none port/host]
user: port/user
pass: port/pass
port-id: either all [por

[REBOL] closing port within protocol ... Re:(2)

2000-02-29 Thread ingo

Hi Gabriele,

I'm using direct right now, I have checked pass-through, too,
but wasn't able to resolve this way ...

Everything else works fine, but having a read that can't
return a value, isn't optimal, I think ;-)


thanks,

Ingo


Those were the words of [EMAIL PROTECTED]:
> [EMAIL PROTECTED] wrote:
> 
> > my problem: within a protocols read function I have to close
> > the original port, so that the server reads the data I sent.
> > (I tried write-io, but it didn't work.) Naturally, I get an
> > hour, when the port is to be closed by the protocol ...
> 
> Are you using a direct or pass-thru scheme?
> 
> Ciao,
> /Gabriele./

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] closing port within protocol ...

2000-02-28 Thread ingo

Hi Rebols,

my problem: within a protocols read function I have to close
the original port, so that the server reads the data I sent.
(I tried write-io, but it didn't work.) Naturally, I get an
hour, when the port is to be closed by the protocol ...


Thanks for any help

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] howto connect to server over tcp port

2000-02-27 Thread ingo

Hi Rebols,

I am trying to connect to a server, this works so far ...

 p: open tcp://localhost:10009 ; open port
 read-io p ServerHello 10  ; read hello from Server
 p/state/with: "^J"; set the line endings
 insert p "MyCommand^/"; send my command
 close p   ; close port, so the server
   ; reads my commands

But now I need to reconnect, to read the servers answer,
but the server opens a new connection, and I don't get the
data.

Also, what would I do to make it a protocol? 

open-check seems not to be read with read-io ... where 
do I set p/state/with, and then the problem with closing
and reconnect ...


Thanks in advance for any help

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] if condition vs. while condition Re:

2000-02-24 Thread ingo

Hi Pihoz,

it doesn't even help, to have a look at until ...

>> help until
Evaluates a block until it is TRUE. 
Arguments:
block --  (block)

where the loop-condition is the return value of 
the loop-block itself. Ideally they all had the
same parameters, I think.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Hello,
> 
> For both a decision-making construct like "if" and a
> loop construct like
> "while" we need to specify a condition. Based on the
> evaluation of that
> condition, we would proceed with the loop or the body
> of the
> conditional.
> 
> In REBOL, the condition for a while loop is specified
> as a "block" but
> the condition for an if statement is specified as a
> "condition."  
> 
> In this context, what is the definition of a
> "condition" and why does
> REBOL treat the two conditions differently?  Why not
> use a block for an
> "if" statement as we do for loops?
> 
> 
> >> help if
> If condition is TRUE, evaluates the block.
> Arguments:
> condition --
> block --  (block)
> >> help while
> While a condition block is TRUE, evaluates another
> block.
> Arguments:
> cond-block --  (block)
> body-block --  (block)
<...> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] constructor & destructor Re:

2000-02-21 Thread ingo

Hi Martin,

constructors are easily done. 

>> a: [
[print "hey, I'm new here ..."
[b: 3
[]
>> b: make object! a
hey, I'm new here ...
>>

I have no idea on destructors, though ...


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Since I've programmed sometime i C++ with classes (almost like objects in REBOL), 
>I've missed some features in the objects in REBOL.
> 
> What about constructors (a member function that is executed at object creation) and 
>destructors (a member function that is executed at object deletion)?
> 
> 1. Will it be added to REBOL?
> 
> 2. How can it be made with current implementation of REBOL?
> 
> Yours faithfully
> ---
> Martin Ancher Holm
> Work <[EMAIL PROTECTED]>, Home <[EMAIL PROTECTED]>
> <http://wwww.dk>,Cell <[EMAIL PROTECTED]>
> 
> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] URL for rebol archive? Re:

2000-02-17 Thread ingo

Hi Rich,

have a look at http://www.rebol.org


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> I was lookiing on the rebol site for an archive of the list. I remember
> seeing it but cant find it now.
> 
> Got the URL?
> 
> -Rich
> 

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] EOF? Help please Re:(3)

2000-02-15 Thread ingo

Hi Tiana,

when your file has an empty last line, pointing at this line
your block is not yet empty, because it is pointing at "".
now try

to-block ""
== []

which has no second element. Thus the error.

One possible solution is:

blk: read/lines %test.dat
while [
   all [
   not empty? blk
   not none? d1: pick (to-block first blk) 2
   ]
] [
d1: parse d1 "-"
d1: to-date d1/1
print d1
blk: next blk
print blk
either not empty? blk [print "not empty"][print "empty"]
]

'pick does not raise an error, if the refereneced element does
not exist, but returns 'none.
'all returns 'true, if all of it's elemets return 'true


hope this helps,

regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Hi, Andrew,
> Thanks for your reply. I don't think it is the problem of a simple while loop. I
> attached my script and input file in this msg:
> 
> blk: read/lines %test.dat   
> while [not empty? blk]
> [
> d1:  second (to-block first blk) 
> d1: parse d1 "-"
> d1: to-date d1/1
> print d1
> blk: next blk 
> print blk   
> either not empty? blk [print "not empty"][print "empty"]
> ]
> 
> test.dat:
> 
> 21-Feb-2000{ 2000/02/01-00:20  -  2000/02/08-21:48 }7629
> 20-Feb-2000{ 2000/02/02-00:20  -  2000/02/08-21:48 }7629
> 19-Feb-2000{ 2000/02/03-00:20  -  2000/02/08-21:48 }7629
> 
> 
> This test.dat file is generated by machine. The weird thing is if I open the
> file and clear its tail, the script worked fine. But if I added an empty newline
> at the end of file, it won't work. 
> ** Script Error: Out of range or past end.
> ** Where: d1: second (to-block first blk) 
> 
> When rebol execute 
> 
> either not empty? blk [print "not empty"][print "empty"]
> 
> it always prints 'not empty' even the content of blk printed is blank.
> 
> I'm so frustrated about this. Can u help me out?
> 
> Thanks a million.
> 
> Tiana
> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] How can i get rebol/view Re:

2000-02-12 Thread ingo

Hi Volker,

this is the email I got from [EMAIL PROTECTED], sending them 
a message should still work. At the start they checked mails
against "me too"s, manually, so it may take some time till 
you get an answer. If it doesn't work, drop a short note to
[EMAIL PROTECTED]



Beta View testers, 
 
It's here!  Actually, the Windows version 
is here and the Unices will be right behind it... 
 
In order to receive a copy of the Windows Beta 
version, please send a message (do not hit reply) 
to [EMAIL PROTECTED] with the subject: 
send view031.zip 
 
If you'd like a copy of a Unix version, please 
email [EMAIL PROTECTED], and we'll send you a notice 
as soon as the testing for the "X-Windows" 
version is completed. 
 
Thank you for your patience and we look forward 
to your feedback, 
 
The REBOL Team 
 


Those were the words of [EMAIL PROTECTED]:
> Can't find it on the webpage. Peoples here are talking about.
> how can i test it?
> 
> Gruss Volker
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] REBOL/View Re:

2000-02-09 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> 
> hello,
> 
> as anybody been able to retrieve the unix version of rebol/view beta ?
> is it available ?
> what's the exact file name ? 
> the setup doc for windows only states "viewxxx.tar.gz" and using the same
> version number than windows doesn't help the email retrieve engine.
> 
> thx-
> 
Hi Rebols,

as far as I know, up to now only the Windows beta is available. 
Once other Versions are online, I assume the'll have the same 
endings as the rebol/core versions ... (e.g.: view042.tgz should
be linux libc6).


regards,

Ingo

--  _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] post vs get Re:(3)

2000-02-09 Thread ingo

Hi John,

Those were the words of [EMAIL PROTECTED]:
> The reason for the HTML presentation is the ability to format a nice and 
> business presentation not available with ASCII..

Well, not very helpful if I can't see it, though ...


ragards,

Ingo

> //john
> 
> At 0541 2/9/00 , you wrote:
> >If you have to send email in HTML, could you also send it in ASCII ?
> >
> >Many people are sending a readable ASCII version, followed by an HTML
> >version. Personally, I would be happier with just the ASCII, especially
> >as most mails here contain Rebol code.
> >
> >Regards
> >--
> >Don Cox
> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] disabling output? Re:

2000-02-09 Thread ingo

Hi Stafan,

I am not sure, but setting 

system/options/quit: true

should do it, I think ...


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Hi,
> 
> is there a way to disable the output that ftp transfers make? I don't want
> it to print each file (with path) that it transfers...
> 
> //Best Regards Stefan Falk
> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] read dns:// and dynamic ip

2000-02-05 Thread ingo

Hi Rebols (especially Holger),

I am using Linux, and only dial-up network. When I am
online read dns:// always gets my local name/address,
not the one I get assigned by my ISP. 

Any ideas what to do there?


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|



[REBOL] post.r is incompatible with core 2.2? Re:

2000-02-02 Thread ingo

Hi,

Those were the words of [EMAIL PROTECTED]:
> I don't know if anyone is using Andrew's Grossman post.r script, but I don't
> think it likes the new Rebol versions (though it works fine with 2.1.2.3.1)
> 
> 
> with Rebol/ore 2.2.0.3.1 and Rebol/View I got the following:
> 
> 
> ** Script Error: Duplicate function value: file-dir.
> ** Where: func [
> file-dir [file!] "Directory in which to put uploaded files"
> save-as-field [logic!] "save files as field name or uploaded filename"
> /local file-dir save-as-field str boundary done name file done2 content
> ] [...
> ...
>
> any ideas?

Yup,

the argument "file-dir" is duplicated under "/local" pre 2.2 versions 
allowed this although it never made much sense. You may just delete it
from the "/local" section and go on.


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|





[REBOL] [REBOL] The forthcoming REBOL/View Re:(4)

2000-01-28 Thread ingo

 [REBOL] The forthcoming REBOL/View Re:(4)

At 01:25 PM 1/28/00 +0100, you wrote:

>PS: does it do smooth scrolling? ;-)

Hi Petr,

If you are expecting Flash, you'll be disappointed, BUT if you are looking
for an insanely easy way to create GUI interfaces, you'll be very happy!

I'm at the point of just writing demo's now to try and push the envelope a
bit and see if there are any gotchas. Only found a couple so far

>>>

Hi Jim,

if you'd give us the beta right now, we could help you ;-D


regards,

Ingo

--
GEAT! It works!



[REBOL] [REBOL] one file user guide ? Re:

2000-01-28 Thread ingo

[REBOL] one file user guide ? Re:

>Hi,
>Is there a version of the user guide that is downloadable (and printable) in
>ONE file ? 

Someone mentioned he made a pdf version from the beta docs ...
Maybe, he'll do this again (despite the lengthy discussion on
what format to be used ...

regards,

Ingo

--
GEAT! It works!



[REBOL] [ENHANCEMENT] help patch Re:

2000-01-27 Thread ingo

Hi Rebols

in the original post was an error left, it didn't work
on words without value, now the Value? test has been 
moved to the correct place.


help: func [
   "Prints information about words and values."
   'word [any-type!]
   /local value args item refmode types
][
   if unset? get/any 'word [
  print trim/auto {
^-^-^-^-The help function provides a simple way to get
^-^-^-^-information about words and values.  To use it
^-^-^-^-supply a word or value as its argument:
^-^-^-^-
^-^-^-^-^-help insert

^-^-^-^-In addition to help, these other words provide
^-^-^-^-information about the REBOL language:
^-^-^-^-
^-^-^-^-^-about - for general info
^-^-^-^-^-usage - for the command line arguments
^-^-^-^-^-license - for the terms of user license
^-^-^-^-^-source func - print source for given function
^-^-^-^-
^-^-^-^-For more information, see the user guides.
^-^-^-}
  exit
   ]

   ; \/ \/ \/ start changes by iho
   if path? :word [
  use [obj parts i j] [
 i: 2
 parts: parse mold :word "/"
 if error? try [obj: get to-word first parts] [
print ["Path:" :word "not found"]
exit
 ]
 while [all [object? :obj i <= length? parts] ] [
either not error? try [obj: get in obj to-word pick parts i] [
   ++ i
] [
   break
]
 ]
 pth: first parts
 for j 2 i - 1 1 [
append pth rejoin ["/" pick parts j ]
 ]
 prin rejoin [{Valid subpath "} pth]
 either function? :obj [
print {" is function:^/}
help obj
 ][
either object? :obj [
   print {" is:^/}
   help obj
] [
   print {"^/}
   help obj
]
 ]
  ]
  exit
   ]
   if not value? word [
  print ["No information on" word "(word has no value)"]
  exit
   ]
   if object? get :word [
  use [wrd hlp] [
 print "Is object with fields:"
 foreach wrd next first get word [
either function? get in get word wrd [
   print [wrd ":  func" either string? hlp: first third get in get word 
wrd [
 mold first parse/all hlp "^/"][""]]
] [
   print [wrd ": " type? get in get word wrd]
]
 ]
 exit
  ]
   ]
   ; /\ /\ /\ end changes by iho

   if not word? :word [
  print [mold word "is" type? word]
  exit
   ]
   value: get word
   if not any-function? :value [
  print [mold word "is" type? word "of value:" mold value]
  exit
   ]
   args: third :value
   refmode: false
   either string? pick args 1 [
  print first args args: next args
   ] [
  print "(undocumented)"
   ]
   if block? pick args 1 [
  print "Attributes:"
  item: first args
  args: next args
  while [not tail? item] [
 value: first item
 item: next item
 if any-word? value [
prin ["   " value "-- "]
if string? pick item 1 [prin first item item: next item]
print ""
 ]
  ]
   ]
   if tail? args [exit]
   print "Arguments:"
   while [not tail? args] [
  item: first args
  args: next args
  if (mold item) = "/local" [break]
  if all [refinement? item not refmode] [
 print "Refinements:"
 refmode: true
  ]
  either refinement? item [
 prin ["   " mold item]
 if string? pick args 1 [prin [" --" first args] args: next args]
 print ""
  ] [
 if any-word? item [
if refmode [prin "    "]
prin ["   " item "-- "]
    types: if block? pick args 1 [args: next args first back args]
if string? pick args 1 [prin first args args: next args]
if types [prin rejoin [" (" types ")"]]
print ""
 ]
  ]
   ]
   exit
]


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|



[REBOL] HTTP basic auth - object? Re:(2)

2000-01-27 Thread ingo

Hi Andrew,

Those were the words of [EMAIL PROTECTED]:
> Hi, Porter. You wrote:
<...> 

You can shorten the appends by using compose, e.g.

REBOL []

Scheme!: make object! [
scheme: word!
user: string!
pass: string!
host: [tuple! url!]
path: file!
Block: function [Full_FileName][Block][
 path: Full_FileName
 Block: compose [
  scheme: (to-lit-word scheme)
  user: (user)
  pass: (pass)
  host: (form host)
  path: (path)
 ]
Block: make block! 10
Block
]
]

Scheme: Scheme!
Scheme/scheme: 'http
Scheme/user: "webuser"
Scheme/pass: "letmein"
Scheme/host: 127.0.0.1
Scheme/path: %mysite/default.htm
Scheme/Block "mysite/default.htm"


>> do %scheme.r
Script: "Untitled" (none)
== [
scheme: 'http 
user: "webuser" 
pass: "letmein" 
host: "127.0.0.1" 
path: "mysite/default.htm"]


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|




[REBOL] [ENHANCEMENT] help patch

2000-01-26 Thread ingo
nt? item [
 prin ["   " mold item]
 if string? pick args 1 [prin [" --" first args] args: next args]
 print ""
  ] [
 if any-word? item [
if refmode [prin ""]
prin ["   " item "-- "]
types: if block? pick args 1 [args: next args first back args]
if string? pick args 1 [prin first args args: next args]
if types [prin rejoin [" (" types ")"]]
print ""
 ]
  ]
   ]
   exit
]


I'm not sure it's the best possible implementation, but
it seems to work.


regards,

Ingo


signature: [
Name:  "Ingo Hohmann"
email: [EMAIL PROTECTED]
home:  http://www.2b1.de/Rebol/
] 



[REBOL] BE PATIENT! - was - Openletter to Rebol HQ. Re:(3)

2000-01-20 Thread ingo

Hi Dan,

waiting until a product is ready, and _then_ releasing it,
is a Good Thing (tm), but it is even better to tell people
about what is happening. You have this shiny little 
[EMAIL PROTECTED] mailing list, why don't you use it? Some
messages like:

- hey, today we started working on the palm version
- Ohh, sorry, we ran into memory management problems in the
  palm version, so it is dropped for the time being
- Rebol/View beta is in the works, that's what it will 
  contain ...

.. and so on. Whenever something interesting happens would 
surely raise confidence in Rebol (Tech.)

jus' my some and a half cents,


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
<..>
> At 12:36 AM 1/20/00 +0100, you wrote:
<..>
> >Just to avoid such threads I would even dare to suggest Carl some form
> >of "Monthly letter of REBOL creator", discussing some actual developments 
> >inside of company, if not secret of course ...
> >
> >-pekr-
<..>

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] line-numbers & error messages Re:(2)

2000-01-16 Thread ingo

Hi Joel,

IMHO most of the time there is a linenumber involved, in your
special cases:
a, c, d: there must be some sort of do/reduce somewhere, that
 _is_ anchored in sourcecode
b:   well, try to give the original linenumber, but remember,
 you'll have real problems to find the error position, with
 the where: ..., too.

Where doesn't need to be completely dropped, though.


regards, 

Ingo 


Those were the words of [EMAIL PROTECTED]:
> [EMAIL PROTECTED] wrote:
> > 
> > Hi, would it be possible to return line-numbers when an error
> > message is given? The where: ... is not always so clear,
> > especially in huge scripts.
> > 
> 
> That sounds sort of useful, but quite limited.  For example, what
> meaning does "line number" have for code that:
> 
> a)  is in a block (or string) that was constructed by another piece of
> code, with no source file involved;
> b)  originally came from a source file, but has since been modified
> in memory (by itself or another piece of code);
> c)  is code entered interactively from the command line
> d)  is in a "do" executed block (which may "do" other blocks...)
> 
> -jn-
> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Dialecting improvement? Re:(3)

2000-01-13 Thread ingo

Those were the words of [EMAIL PROTECTED]:
<...> 
> But as for "real" dialects, look at 'parse function, which will enable you to create
> own grammars, sublanguages 
<...>

Or have a look at http://www.openip.org/ into the OpenWeb section.
It's about building a rebol dialect for html creation, and the only
real dialect I know about. 


regards,

Ingo

--  _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] What's next for REBOL... Re:(8)

2000-01-07 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> Moi aussi,  Watakushi mo...me too!
> 

I can only add: Ich auch, ich auch !!!

me, too, please :-)


regards,

Ingo



[REBOL] Merry Christmas ...

1999-12-20 Thread ingo

... and a happy new year

to you all.


My Computer will be shut down for the rest of this year.
(not out of fear about a certain date ;-)

I hope to see you all next year.


Love to all,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
 ._|  ._|



[REBOL] "logical" value referencing ... Re:(7)

1999-12-16 Thread ingo

Hi Elan,

Those were the words of [EMAIL PROTECTED]:
> Hi Ingo,
> 
> without wanting to sway opinions one way or the other. You wrote:
> 
> >Thus insert? / tail? would work on the series at the variables index,
> >empty? / append would work on the series at a whole. That seems consistent
> >to me, not to words, that seem to mean different things (empty?/tail?) which
> >are just the same.
> 
> Is it inconsistent with your argument that append is a wrapper function for
> the combination insert / tail ? ;-)
> 

Not at all!

Someone had the right idea to define empty? as a wrapper function
for the combination tail? / head, but in his haste ended up with
with an alias to tail? ;-)


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] "logical" value referencing ... Re:(5)

1999-12-16 Thread ingo

Hi Joel

Those were the words of [EMAIL PROTECTED]:
<...> 
> For clarity of communication, and ease of learning by newcomers,
> I'm simply proposing that:
> 
> A) each language concept should have one unique name/term
>(although explanations and tutorials obviously will use a
> variety of descriptions)
> B) each name/term should refer to one unique concept.
> 
> I believe this somewhat purist approach is compatible with the
> philosophy of a minimalist/elegant language such as REBOL.

I agree here, but

> In THEORY, a series is a data storage and a "current position" 
> within that storage. 
 
> In IMPLEMENTATION, a series has a REFERENCE to a sharable data storage 
> and has a private/nonshared "current position" within that storage. 
> Don't we agree that given: 
>  
> a: next "123456" 
> b: next a 
>  
> both 'a and 'b refer to the same string, but to different positions 
> within that string?  Isn't it valid to say that 'a and 'b are not the 
> same series, but that each is a series referring to the same string 
> (or whatever we want to call the data storage in this example)? 
> Isn't that less ambiguous than saying that they are the same series? 

I find it much easier to understand to call
"123456" - the series, and
'a / 'b  - indexes into the series

To me this seems to show better the difference between actions on
the index ('next, ...) and on the series (insert, ...)


Just my two cents

regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] "logical" value referencing ... Re:(5)

1999-12-15 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> See below:
> 
> Russell [EMAIL PROTECTED]
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 15, 1999 11:42 AM
> Subject: [REBOL] "logical" value referencing ... Re:(3)
> 
> 
> [skip]
> 
> > Personally, I'm also trying to beginning to question why APPEND
> > automatically jumps to the TAIL, but EMPTY? doesn't automatically jump
> > to the HEAD. May submit that one. Doesn't seem consistent.
> 
> As 'append and 'empty? perform different functions, one adding something to
> a series, the other providing info about a series, why should they be
> "consistent"?  'append certainly should 'insert at 'tail.  If you want to
> insert somewhere else in the series, 'insert can do it.  Having 'empty?
> report on the series from the index to the tail is a convenience.  If it
> didn't, someone would surely ask for a variety of empty? that did!  To look
> at the whole series,  use 'empty? 'head .  As it is,
> 'empty? could be useful as a loop termination test where each step of the
> loop 'remove's something and one needs to know if all the items have been
> removed.   IMO, submission isn't needed.

This would be tail? wouldn't it? So I think it would be better if 

tail? reports wether a variables index points at the tail of a list,
empty? reports wether a variable points to a list that is really empty.

Thus insert? / tail? would work on the series at the variables index,
empty? / append would work on the series at a whole. That seems consistent
to me, not to words, that seem to mean different things (empty?/tail?) which
are just the same.

Just my two cents, and I guess we'll go in circles here.


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] RFF: empty? for blocks Re:(2)

1999-12-12 Thread ingo

Hi Rebols,

O.K. empty? is a synonym for tail?. The question now, if this
is preferrable. Rebol is said to be a communication language, 
but there are at least two ends to communication, one of those
is that a script communicates its meaning to the programmer.

Some synonyms help understand a program, e.g. yes/true. If I
read a program, I understand that they really mean the same 
thing, but one or the other might be more natural at specific 
times.

With empty?/tail? it is different. I would naturally think
that they have different meanings, notably
tail?  - if I am at the end of something
empty? - if there is something in the thing I am looking
 at, even if I can't see it at the moment.

So I would vote to change the meaning of empty? to 
head tail?

Someone posted that this would be bad, because there are so
many pointers in Rebol. In the contrary, it would be good, 
because there are so many pointers. 


Just my two cents (oh, well, stating the length of my post,
might be two euro's as well ;-)


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Console GUI functions? Re:(6)

1999-12-10 Thread ingo

Those were the words of [EMAIL PROTECTED]:
<...> 
> Well, let's see what we would need for a GUI function collection (just add
> what's missing):
> 
> 1. Write a rectangular-block of data to a specific x,y coordinate, where
> content is rolled-out to the right and down. Refinement of this function
> should be able to take a rectangular destination area and strip the source
> to these borders.
> 
> 2. Have a way to store textual data in a Rebol-object, so that it can be
> accessed given a top-left/bottom-right coordinate:
> get-content myContent 3 4 12 12
> 
> 3. Have a stack of rectangular regions which can be stored and restored.
> put console-content 3 4 12 12
> put console-content 5 6 7 7
> pop (restores and removes the top element)
> top (restores the top element)
> 
> 4. Have a tool to convert textual gui-masks created with an editor etc.,
> which can later be load into Rebol.

I agree with 1 to 3, could do without 4, though. 

Would be nice if we could compute what gui element get's the focus,
or elements from within a list, by the cursor position ...
(Just dreaming ;-)


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Web Gui - Was Re: Console GUI functions?

1999-12-10 Thread ingo

Hi Robert,

Those were the words of [EMAIL PROTECTED]:
<...> 
> > Might this be something you could do in a browser via CGI?
> 
> Hi, I thought about this too (to use a Browser) but the problem is that a
> browser works page-oriented and you don't have access to the 'cursor'
> location. So to change the content and update, you have to create a
> complete new page (there exist some tricks to avoid this but that's not
> very portable) and this will be to slow, text-GUIs are used for
> applications where usage-speed is everything. Robert
> 

We could throw together a rebol web-server and the html dialect,
the gui could be built as a form, as for the cgi, just Rebol scripts
run directly in the server. Could even be used as a module.

I know, every once in a while I have to throw in a link to pliant.
There's dialect, that does just that. Create html from a pliant script,
with dynamic content just run in the pliant server.

see: http://pliant.cams.ehess.fr/


regards

Ingo

--  _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] User Guide in PDF 8) Re:(4)

1999-12-10 Thread ingo

Hi Elan,

Those were the words of [EMAIL PROTECTED]:
> Hi Ingo,
> 
> >Please, not RTF. Not everyone has RTF capabilities. (I for one haven't
> >found an editor on Linux that understood RTF _AND_ was worth having around.)
> >How about Postscript, then? Or just the all-in-one-html? 
> 
> Have you tried AbiWord? http://www.abisource.com/

Not yet. But I sure will give it a try next time I need RTF.

I myself have settled to use html, or Latex when I need better
printing. 


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] User Guide in PDF 8) Re:(2)

1999-12-09 Thread ingo

Hi Elliott,

Those were the words of [EMAIL PROTECTED]:
> Hello, 
> On 30-Nov-99, [EMAIL PROTECTED] wrote:
> 
> > Well, for who is interested, here are
> > the PDF formatted UserGuide Draft1:
> > 
> > Letter format:
> > http://reboot.ch/REBOL_UG_Letter.pdf
> > 
> > A4 format:
> > http://reboot.ch/REBOL_UG_A4.pdf
> 
> Please, not PDF.  Not everyone has PDF capabilities.  Perhaps ASCII, or RTF
> if you need formatting, many word processors accept RTF.

Please, not RTF. Not everyone has RTF capabilities. (I for one haven't
found an editor on Linux that understood RTF _AND_ was worth having around.)
How about Postscript, then? Or just the all-in-one-html? 


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Console GUI functions? Re:(4)

1999-12-09 Thread ingo

Hi Robert, Gabriele,

I'm even more late, I once thought about it, too but didn't
come to the point where I could start. I don't think I have
any ideas you two haven't thought of by now, but I would be 
interested, too.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 09, 1999 3:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [REBOL] Console GUI functions? Re:(2)
> 
> > Sorry for being late, I did some job in this field.
> 
> Hi, I would be interested in it ;-))
> 
<...> 

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] A function bug Re:

1999-12-08 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> Hi, Rebols,
> 
> found this:
> 
> >> block1: [do func[f [any-function!]] [print "OK"] func [x] [print "OK"]]
> == [do func [f [any-function!]] [print "OK"] func [x] [print "OK"]]
> >> block2: [do func [f [any-function!]] [print "OK"]]
> == [do func [f [any-function!]] [print "OK"]]
> >> append block2 :f
> == [do func [f [any-function!]] [print "OK"] func [x][print "OK"]]
> >> do block1
> OK
> >> do block2
> ** Script Error: none is missing its x argument.
> ** Where: do func [f [any-function!]] [print "OK"] func [x][print "OK"]
> 

Hi Ladislav, could you please tell us what _your_ 'f is? because ...

>> rebol/version
== 2.2.0.4.2
>> block1: [do func[f [any-function!]] [print "OK"] func [x] [print "OK"]]  
== [do func [f [any-function!]] [print "OK"] func [x] [print "OK"]]
>> do block1
OK
>> block2: [do func [f [any-function!]] [print "OK"]]  
== [do func [f [any-function!]] [print "OK"]]
>> append block2 :f  
** Script Error: f has no value.
** Where: append block2 :f
>> f: [func [x] [print "OK"]]
== [func [x] [print "OK"]]
>> append block2 :f  
== [do func [f [any-function!]] [print "OK"] func [x] [print "OK"]]
>> do block2
OK


I don't know _why_ it works, though after we have heard multiple times,
that it can't ;-)


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] REBOL Trivia :) Re:

1999-12-07 Thread ingo

Those were the words of [EMAIL PROTECTED]:
> Who here has been around long enough to remember the original name of this
> language before REBOL was coined :) NO help from the REBOL people. I just
> duig up a mirror. Correct answers get a brownie button :)
> 
> FLA

I'd say it was LAVA, am I right?


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Objects: Preventing Code Duplication Re:(3)

1999-12-02 Thread ingo

Hi Elan, 

my point I wanted to state was: if both 'probe s are the same
you can't use the probe to show that it's not duplicated, am I
right?


regards

Ingo

Those were the words of [EMAIL PROTECTED]:
> Hi Ingo,
> 
> yes, you do get the same probe because the use context is hidden both in
> the ancestor as well as the descendant. However, it remains available, as
> you can easily determine by evaluating 
> 
> ancestor/do-something
> 
> which successfully evaluates both func-1 and func-2 in both ancestor and
> descendant objects.
> 
> Elan
<...> 
> >> descendant: make ancestor []
> >> 
> >> >> descendant/do-something
> >> func-1: tons of code here
> >> func-2 tons of code here
> >> >> probe descendant
> >> 
> >> make object! [
> >>   do-something: func ["this function will be inherited"][
> >> func-1
> >> func-2
> >>   ]
> >> ]
<...>

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Objects: Preventing Code Duplication Re:

1999-12-01 Thread ingo

Hi Elan,

are you sure it works the way you think? I'm only asking, because
you get exactly the same output for:

>> probe ancestor

make object! [
do-something: func ["this function will be inherited"][
func-1 
func-2
]
]
>> probe descendant

make object! [
do-something: func ["this function will be inherited"][
func-1 
func-2
]
]

and I would like it to work.


regards,

Ingo

Those were the words of [EMAIL PROTECTED]:
> Hi guys,
> 
> Sorry, can't remember all the names. Have little time. 
> 
> Someone observed that descendant objects inherit their ancestor object's
> function implementations and variables. This leads to inflated code. The
> following mechanism can be used to avoid inheriting some code. It uses use
> contexts:
> 
> ancestor: make object! [
>   do-something: none
>   use [var-1 var-1 comment {more vars here} func-1 func-2 func-3 ] [
> var-1: "this is var-1"
> var-2: "this is var-2"
> ;- more vars here ...
> func-1: func ["extremely long function. don't inherit."] [ 
>   print "func-1: tons of code here"
> ]
> func-2: func ["also extremely long function. don't inherit."] [ 
>   print "func-2 tons of code here"
> ]
> do-something: func ["this function will be inherited"] [
>   func-1
>   func-2
> ]
>   ]
> ]
> 
> descendant: make ancestor []
> 
> >> descendant/do-something
> func-1: tons of code here
> func-2 tons of code here
> >> probe descendant
> 
> make object! [
>   do-something: func ["this function will be inherited"][
> func-1
> func-2
>   ]
> ]
> 
> ;- Elan
> 
> 
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Newby needs some "strings" help Re:(2)

1999-12-01 Thread ingo

Hi Andrew,

there's an error in here. The parse should read:

parse line [thru "key1=" copy key1 to "key2=" thru "key2=" copy key2 to "key3=" 
thru "key3=" copy key3 to end]

Without the 'skip s. skip advances one character, so the following "key..." 
string can not be found any more.


regards,

Ingo


Those were the words of Andrew M. Grossmann:
> try something like:
> 
> foreach line read/lines %data.txt [
> parse line [thru "key1=" copy key1 to "key2=" skip thru "key2=" copy key2 to "key3=" 
>skip thru "key3=" copy key3 to end]
> ; do stuff with keys here
> ]
> 
> Take a look at the docs on parse as well.
> 
> --
> Andrew Grossman
> 
> --- You wrote:
> I am new to Rebol and need some help dealing with strings.  I've looked around
> for examples but can't find any - so I would appreciate it if you could give me
> some advise or point me to an example. Here's th
> --- end of quote ---
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] system/words question

1999-12-01 Thread ingo

Hi Rebols,

why are locally created words listed in system/words, too?
try:

>> cc: words-of system/words   
== [unset! ...
>> xx: func ["Testfunc" yy /local zz][zz: 1 print [ yy zz ]]
>> dd: words-of system/words   
== [unset! ...
>> ee: difference cc dd
== [xx yy zz]
>> value? 'yy
== false

Are all locally created words listed, and are they the
only one listed without values?


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Q on Array of Objects Re:(8)

1999-11-30 Thread ingo

Hi Andrew,

Those were the words of [EMAIL PROTECTED]:
> Hi, Ingo.
> Caution - none of this works as expected.
<...>

Ahhh, so it wasn't me :-)

> ; Something like this in REBOL would be nice:
> 
> C!: make class! [
>   s: "a string"
>   m: method [parameter] [s]
>   ]
> 
> Cc: make C! [
>   m: overide method [blah] [join s blah]
>   ]

How about sending this as an enhancement request? I'm 
afraid Bo will install a spam filter against me, if I
continue mailing enhancement requests ;-)
 

Ingo

--  _     ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Change console size? Re:

1999-11-30 Thread ingo

Hi Robert,

I don't think that this would be possible. The console window size
is normally determined by, well, the console. Which is essentially
a text-only display. When run in an xterm, you would have to get 
the handler of the xterm-window, and change this ...

Could be possible on windows/mac, where there's an extra window 
opened for rebol.

I personally don't like windows resizing themselves, I normally 
have a perfectly good reason for the window-size I chose.

Just my (maybe limited) understanding, and some two cents.


ragards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Hi, is it possible to change the size of the console window from a script?
> I would like to ensure that the console window has a specific size.
> 
> Robert M. Muench, Karlsruhe, Germany
> ==> ask for PGP public-key <==
> 
>   When do you want to reboot today?
> 
> Use the free portable GUI Library
> OpenAmulet from http://www.openip.org
> 



[REBOL] Q on Array of Objects Re:(6)

1999-11-29 Thread ingo

Hi Andrew,

Those were the words of [EMAIL PROTECTED]:
> Andrew wrote:
> > Words in objects which refer to functions are copied. Therefore the
> object will be bigger than expected.
> 
> Ingo wrote:
> > Seems logical, given that functions are the same as data in Rebol,
> but it would be nice to have them only once for a set of equal objects,
> ..
> 
>   Yes. I'm thinking there should be a way of recreating objects so as to
> have sort of ability. It would probably mean loosing the ability to mix
> code and data. Something like the Interface and Implementation objects
> I posted earlier.

That could be a way to make it work now. Another approach could be
a refinement to set:

set/reference

that always only adds a reference to the real value, you had to manually 
set all words in the object, you want only once, but it could also be used
to add class variables.


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] What's the REBOL strategy towards Unicode?

1999-11-29 Thread ingo

Hi Rebols,

I stumbled over this today:

... It's no accident that the latest development version of Perl
lets you name your variables with any characters that are considered
to be alphanumeric in Unicode. That includes ideographs. There 
are a billion people in China. And I want them to be able to pass 
notes to each other written in Perl. I want them to be able to write
poetry in Perl.
...

(Larry Wall, in the O'Reilly book "Open Sources")

Though Unicode would bloat the code, this seems a very good reason
to include it. Given that Rebol is called a communication language.


regards,

Ingo

--  _ .    _
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Tail recursion in REBOL 2.0 Re:(2)

1999-11-28 Thread ingo

When I asked Rebol Tech about tail-recursion some time ago, 
that was what they told me. And that they wanted it back, too,
but only for functions that need it. So maybe we'll at some time 
see a function argument [recursive], or the like,


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
<...> 
> REBOL 1.0 was tail recursive, and it was SLOW. This is because, as
> Joe Marshall expalined to me, handling tail recursion is not an
> easy thing to do. I'd like to see tail recursion back in REBOL,
> but I'm not sure if I'd want the complexity of the interpreter to
> increase. I'd prefer a better solution, such as testing for tail
> recursion only on function that require it:
> 
> f: tail-recursive-func [...] [...]
> 
> Regards,
> Gabriele.
> -- 
> o) .-^-. (--o
> | Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
> | GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
> o) `-v-' (--o
> 
> 
Hi Rebols,




regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] Q on Array of Objects Re:(4)

1999-11-28 Thread ingo

Hi Andrew,

Those were the words of [EMAIL PROTECTED]:
<...>
> Words in objects which refer to functions are copied. Therefore the
> object will be bigger than expected.
<...>

seems logical, given that functions are the same as data in Rebol,
but it would be nice to have them only once for a set of equal
objects, ...


regards,

Ingo

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



[REBOL] cgi Re:(3)

1999-11-28 Thread ingo

I am no expert either, but I seem to have it going (at last).

I added the following to access.conf


AllowOverride All
Options ExecCGI FollowSymLinks
order allow,deny
allow from all


This allows me to use CGI (ExecCGI) within the dir
/home/ingo/public_html and all its sub-dirs.

CGI scripts need to have the ending .cgi (this may be 
changed somewhere else), be runnable, and have a 
#!rebol -cs
in the first line (if the rebol executable is in the same
directory)

I don't remember if I changed other settings in the apache
conffiles, sorry


>   1. 

[REBOL] parse question Re:(2)

1999-11-24 Thread ingo

Hi Bo,

I am a bit behind with reading my email, so this solution
seems perfect, but I also want to learn something about 
parse, so if you please could the parse version, too?


thanks

Ingo

Those were the words of Bohdan Bo Lechnowsky:
> 
> Ingo,
> 
> Assuming your input line looks like this:
> 
> inline: "a1=1, a2=2, a3=3, a4"
> 
> Here is a one-line solution to do what you want:
> 
> do replace replace/all replace/all inline "," " " "=" ": " "a4" "a4: true"
<...> 
> If you were asking in order to learn more about PARSE on the other hand,
> let me know and I'll show you a way to do it with PARSE (although it will
> require a few more lines of script).

--  _ ._
ingo@)|_ /|  _| _   ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/ ._|  ._|



  1   2   >