[REBOL] AW: REBOL, AMIGA/TAO & MICRO$OFT DOT-NET (Long!) Re:(2)

2000-10-03 Thread Jean . Holzammer


> 
> You are both wrong here. Sheep is the name of new scripting language for
> Amiverse, and it's being done by Vouter, author of famous AmigaE. 

Wouter van Oortmerssen, really ? Cool ! E is my favourite compiler language.
:)

Jean




[REBOL] Re: Batch output to DOS-Console

2000-08-24 Thread Jean . Holzammer


> 
> Hi list,
> 
> When I REBOL start from a command shell (DOS-Box) with
> 
> REBOL script.r
> 
> how can I redirect all REBOL-Output to the DOS-Console?
> 
> Thanks Helmut 

Try:

REBOL script.r | more




[REBOL] Enhancement Request - Range! datatype Re:(9)

2000-08-21 Thread Jean . Holzammer

>
> 
> Does "to" have any special meaning in Czechoslovakian (I hope I spelled
that
> right), pekr?
> 

Probably the same as in Spaenglish ;-)  (there are 2 (!) languages, one
Czech and one Slovakian. You are from the U.S. , aren't you ?)

Jean  




[REBOL] AW: Standard input hangs rebol? Re:

2000-07-26 Thread Jean . Holzammer


> *** REPLY SEPARATOR  ***
> 
> On 00-07-24 at 19:19 [EMAIL PROTECTED] wrote:
> 
> >Hello, rebol community!
> >
> >I have the following rebol-script:
> >-
> >REBOL[]
> >probe "hello, world!"
> >-
> >
> >when I say at command prompt "rebol/rebol -q hello-world.r" it works of
> >course. But when I say "echo 12345|rebol/rebol -q hello-world.r" it
hangs!
> >
> >Could somebody be so kind as to explain what happens?
> >I have REBOL/Core 2.3.0.4.2 under Linux.
> >
> >Petr
> 
> Try "echo 12345|rebol/rebol -qc hello-world.r"
> Mark
> 

Though I don't use Linux myself, I have an idea:

You use the pipe ( | ). So the Shell first executes "echo 12345" and stores
the output of the console (here: 12345).
Then it executes the second command in the pipeline ("rebol/rebol -q
hello-world.r") and attaches the previously stored value (12345) as an
command line argument. So de factto the shell does the following:

rebol/rebol -q hello-world.r 12345

There might be an error in this call. Rebol stops executing the script
without quitting the interpreter ("hangs"). But you don't see the error msg
as you started the interpreter with the quiet option set. Try and start
Rebol without -q.

Jean




[REBOL] to-path curio

2000-07-04 Thread Jean . Holzammer


> 
> And finally
> >> print replace %anz-visa-statement--.r "--" { [30-May-2000 27-Jun-2000]}
> anz-visa-statement [30-May-2000 27-Jun-2000].r
> Success.
> 
> Last question: Are such filenames legal on other OSs (other than Windows)?
> 
> Brett.
> 

Ok, just can tell you about AmigaOS:

characters:
 You can use any characters of ASCII-8 character set except ":" and "/" and
ASCII-Code 00 .
[] .  - % etc. can be used in filenames. But you must be careful as some
characters have special meanings and are interpreted by shells. e.g. if you
create a .jpg file with rebol and save it as mypic#?*.jpg and you have an
image viewer myviewer that supports pattern matching you get into trouble if
you start it from shell as * resp #? are placeholders for the pattern. If
you save a .html file and show it with "openurl
file:///documents:myfile#?*.html" you will not get any problem as openurl
doesn't support pattern matching.
If you don't start a file using a shell but using your desktop or a file
requester you will not get any problem.
Which special character is interpreted as a shell command depends on the
shell you use (AmigaShell,WShell,CSH,KSH,ZShell etc).
If you want to be careful I ' d suggest not to use < > [ ] ( ) : / zerobyte
" ! | ~ * # ? ; ' $ % `

maximum length of filename:
 depends on the used filesystem (8+3,30,107 characters).

case sensitivity:
 depends on the used filesystem (case sensitive,non case sensitive except
foreign characters like äöü etc.,non case sensitive for all characters)

filename extensions:
 depends on the used fielsystem. For MS-DOS 8+3 filesystem you need to have
an extension that begins with a "." ;
 other filesystems don't need one. "." is not a special character.

Hope thsi helps.

Jean 




[REBOL] Email standard definition ?

2000-06-28 Thread Jean . Holzammer

Hi,

does anyone know, where I can find the definition of the standard(s) used
for email ? Is there a ISO or ASCII (or...) norm. I mean,html 4 has been
defined by w3.org. Who did the define the standards for an email file ?

Jean




[REBOL] AW: Empty lines

2000-06-28 Thread Jean . Holzammer


> 
> Thanks for the suggestions, but parse/all as well as trim/lines leaves the
> file untouched. Perhaps i should give some more info on what i am trying
to
> to. I get my hosts file from the unix server, get rid of all additional
> information, so that only ip-adresses are left. They are standing one
beyond
> the other, but sometimes with an empty line between. I want to use this
> modified hosts-file as an input file for my app, which should read line by
> line and calls a function for each line being read.
> 
> Thorsten M
> 

How many empty lines do you get at once ? If just one, you might try
something like that:

myfile: read %filename
search_for: rejoin [newline newline]
replace_with: newline
replace myfile search_for replace_with

for the case that there is more than one empty line at once: don't know
either.

ciao,
  Jean




[REBOL] AW: [REBOL] Calling external functions Re:(2)

2000-05-18 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Donnerstag, 18. Mai 2000 16:13
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Calling external functions Re:(2)
> 
> 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
> 


You can have as many functions in your file as you'd like to.
But put only the function definitions into it.

But only those who are actually used in your project.
As 'do' runs the whole script, all function definitions will be evaluated at
runtime.
If you would like to build your own function library to be used in several
projects,
then it is recommended to have a separate include file for every function.

ciao,

Jean 




[REBOL] AW: [REBOL] Syntax highlighting for GoldED

2000-05-17 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Mittwoch, 17. Mai 2000 23:12
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Syntax highlighting for GoldED
> 
> Hello,
> 
> when talking about syntax highlighting...
> 
> is there any syntax highlighting module for Amiga's GoldED? 
> 
> Thanks, Bolek
> -- 
> --you've been/byl jsi contacted/kontaktovan
> ---
> [EMAIL PROTECTED]
> -www.volny.cz/weirddream
> 
> 


There isn't. And I doubtit's possible to write a good syntax highlighting
module for rebol at all.
In most languages  there are exact naming rules, e.g. in my favourite
language E:
first two literals of word are upper case->constant
first two literals of word are lowercase , not ending in a (   ->variable
first literal upper case, second one lower case ->  standard E function or a
system function
...

But with rebol ?
imagine the syntax parser finds a word like Öffne_Datei :
what is it ? A variable, a function ?

ciao,

Jean




[REBOL] using environment variables Re:(3)

2000-03-13 Thread Jean . Holzammer

Hi,

I don't think there's a general way to set/get environment variables in
REBOL as different OSs use different mechanisms to provide env vars.

Under AmigaOS global env vars are ascii files located in the ENV: path . One
could write following functions to set/get them (not tested yet).

func set [varname varcontent] [write to-file rejoin ["/env/" varname]
varcontent]
func get [varname] [to-string read to-file rejoin ["/env/" varname] ]

usage:
to set a global variable $bla to "This is a test" :

set bla "This is a test"

to get it and store it in a rebol var called gotit:

gotit: get bla

Probably there are other OSs that use a similar mechanism, try it.

Jean
 



[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:

2000-02-15 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Dienstag, 15. Februar 2000 19:41
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Dialecting...Stack Overflow ?! Re:
> 
> Hi Jean,
> 
> that's a funny one.
> 
> join uses append. append uses the REBOL functio head to return the series
> it appended to at its head.
> 
> You redefine head to be
> 
> >head: func [block2] [join "" [block2 ""]]
> 
> So, what happens is whenever join is called within your functions,
> eventually head is called (the intention is to call REBOL's predefined
> head!) and instead of REBOL's head function your head function is called,
> which in turn does a join, which leads to calling head ... and you have
> happily constructed an infinite loop. :-)
> 
> If you rename head to something else:
> 
> html-head
> 
> then you script runs (with problems), producing
> 
> >> do %myhtml.r
> Script: "Untitled" (none)
> html-head title Titel body Das ist ein Text !
> >>
> 
> Note that the next problem you encounter is that you get title Titel
> instead of your intended  and you get body Das ...
> instead of your intended 
> 
> The reason you get this is that you pass the block [title "Titel"] etc.
and
> therefore title is not reduced. You need to use rejoin in your functions
> and - because the block you are passing to html consists of two embedded
> blocks, the html-head block and the body block - you need to use an
> additional reduce in addition to rejoin. Now the thing returns:
> 
> >> do %myhtml.r
> Script: "Untitled" (none)
> title Titel Das ist ein Text !
> 
> and the complete, slightly modified code is:
> 
> REBOL []
> ;definition part
> 
> html: func [block1 ] [rejoin ["" reduce block1 ""]]
> html-head: func [block2] [rejoin ["" block2 ""]]
> body: func [block3] [rejoin ["" block3 ""]]
> title: func [block4] [rejoin ["" block4 ""]]
> 
> ;test part
> a: html
> [
>  html-head
>  [
>   title "Titel"
>  ]
>  body
>  [
>   "Das ist ein Text !"
>  ]
> ]
> print a
>  
> ;- Elan >> [: - )]


Thanks a lot. Now it works :)

So if I use a block within a block I need reduce to tell rebol to evaluate
the embedded block.
But why do I need rejoin in this case ?

 join "" [reduce block1 ""]

also worked as I tried it.


Theoretically,

 rejoin ["" block1 ""]

should work,too. The Rebol doc says:
Rejoin: Reduces and joins a block of values.

ciao,

  Jean




[REBOL] AW: [REBOL] Dialecting...Stack Overflow ?! Re:

2000-02-15 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Dienstag, 15. Februar 2000 17:15
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Dialecting...Stack Overflow ?! Re:
> 
> 'head is also the name of word used a lot by REBOL. Have a look at the
> source for 'append, and you will see why.

using a reserved word is not a good idea, right ?! 

Thanks,

   Jean




[REBOL] Dialecting...Stack Overflow ?!

2000-02-15 Thread Jean . Holzammer

Hi ,

I tried to learn th. about writing dialects. So I did the following code, to
begin with.
I exspected it to putput the following:

TitelDas ist ein Text
!

but I got an error msg of type: stack overflow , though I had increased
stack to 3.000.000 Bytes.

Here's my program:


REBOL []
;definition part
html: func [block1] [join "" [block1 ""]]
head: func [block2] [join "" [block2 ""]]
body: func [block3] [join "" [block3 ""]]
title: func [block4] [join "" [block4 ""]]
;test part
a: html
[
 head
 [
  title "Titel"
 ]
 body
 [
  "Das ist ein Text !"
 ]
]
print a



 <> 

 myhtml.r


[REBOL] AW: [REBOL] Re: Rebol Web Server Re:(7)

2000-01-31 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Samstag, 29. Januar 2000 03:23
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Re: Rebol Web Server Re:(7)
> 
> where? i only could find the good ole ArexxWebServer 2 (2 kb)
> but with no references to rebol :((
> 
Oops, I gave you the wrong name. I mixed up ARWS and HServ to HRWS(same
author afaik)
Try searching for HServ .

Jean




[REBOL] AW: [REBOL] Re: Rebol Web Server Re:(7)

2000-01-28 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Donnerstag, 27. Januar 2000 11:08
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Re: Rebol Web Server Re:(7)

> But I don't see Amiga there.
> 
> > You want it for FREE?
>
 
> Free?  OK, but only if it runs on my platform.
> 
> Elliott

If you need a web server running under AmigaOS that supports Rebol, try
HRWS:
· only 40 KBytes
· totally written in ARexx (so you can adapt the source if you want to)
· supports Rexx and Rebol for CGI
· supports Rebol code embedded in a HTML Dokument
· supports virtual hosts (useful for offline testing purposes)

you can find it -guess ! - at Aminet .



[REBOL] AW: [REBOL] Re: Media on web

2000-01-28 Thread Jean . Holzammer

> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Freitag, 28. Januar 2000 09:29
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] Re: Media on web
> 
> Are you talking about Shockwave Flash (or just flashing text)?  Why would
an
> Amiga site use it if there's no Flash plugins or whatever for Amiga
> browsers?
:  
Just to let you know
Voyager V³ includes a Flash3 Plugin (68K & PPC).

Jean



[REBOL] AW: [REBOL] script needs more than 100 MB of ram , why ?? Re:

2000-01-18 Thread Jean . Holzammer



> -Ursprüngliche Nachricht-
> Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Dienstag, 18. Januar 2000 12:05
> An:   [EMAIL PROTECTED]
> Betreff:  [REBOL] script needs more than 100 MB of ram , why ?? Re:
> 
> Jean Holzammer wrote:
> > any ideas to replace a: join a ... with a less memory consuming
> alternative
> 
> How about:
> append a join to-string num newline
> 
life can be so easy !

thnx !

now my program doesn't that much ram anymore and is also a lot
faster (before 20 mins, now 5 secs !)

rebol allows you to do programs that would need days to develop with
other languages.

but it lacks a good manual.

Ciao,


Jean 



[REBOL] script needs more than 100 MB of ram , why ??

2000-01-18 Thread Jean . Holzammer

i wrote a program that reads the content of a binary file and converts each
byte to a string containing its ascii value. and saves these strings to a
textfile (separated by newline s)
e.g.
imagine a file with this content:

Hello

the program then creates a file with the following content:

72
101
108
108
111

;
my program includes this code:

a: "" ; init an empty string
readtomem: read/binary %dummy.exe ; read the whole file dummy.exe into
memory
foreach num readtomem [
a: join a [num newline] ; add the ascii code as string to a, then add a
newline to a
]
write/append %dummy.txt  a; 

if %dummy.exe has a size of 88.000 Bytes then my script needs more than 100
MB of ram at runtime !!!
the problem seems to be the combination of a loop (foreach) and  a: join a


any ideas to replace a: join a ... with a less memory consuming alternative
???


Jean Holzammer