• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp1023
r3wp10555
total:11578

results window for this page: [start: 2501 end: 2600]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Micha:
28-Apr-2005
how do to check  loam time it will to flow away when port opens ?
Micha:
28-Apr-2005
how do to write this using harbour / awake ?
without using from  port / async ?
Anton:
28-Apr-2005
I do not know how to do it non-async.
Micha:
28-Apr-2005
how do to  send to portu  data when it is open ?
Gabriele:
2-May-2005
replace is mezzanine, so change/dup is going to be faster; also, 
replace is going to be much slower than the simple loop you could 
use to do what replace is doing in this specific case.
Brock:
4-May-2005
;Micha, this should do the trick, you will be returned three variables, 
city, stateprov, and country


get-stateprov: [thru "Stateprov:  " copy stateprov to "^/" to end]
get-country: [thru "country:    " copy country to "^/" to end]
get-city: [thru "City:       " copy city to "^/" to end]

parse test [get-stateprov]
parse test [get-country]
parse test [get-city]
Gordon:
6-May-2005
Hello;

  I'm wondering if there is a more efficeint way to assign values directly 
  to a block of  variables.  My example involves reading lines from 
  a file and assigning them one at a time to each variable.  Here is 
  the line format:


LineFormat: [DateStr Manufacturer MF_Part TD_Part Desc Price1 Price2 
Retail Stock Misc]

Data: read/lines Filename
Str: first Data

Then I go though the String 'Str' and do the assigns

      DateStr: First Str
      Manufacturer: Second Str
      MF_Part: Third Str
      TD_Part: Fourth Str
      Desc: Fifth str
      Price1: skip Str 5
      Price2: skip Str 6
      Retail: skip Str 7
      QOH: skip Str 8
      Misc: skip Str 9


Am I missing something obvious about assigning one block of  values 
to another block of  variables?
Gordon:
7-May-2005
Hello;
  How do you convert a letter (ASCII) to it's hex equivalent?

  I've tried to-hex but it wants an integer!?  You would think it would 
  be easier than:


print to-integer to-string to-hex to-integer to-decimal to-char "a"

which works but there has got to be an easier way.
Janeks:
10-May-2005
O'k. My mistake are offen do not tell what is my target. So it is 
to get working status bar in a layout. As I understood it is possible 
by read-thru.
RebolJohn:
12-May-2005
Help peoples..

I have the following..
  x: [a b c d]

  foreach y x [ set y make string! {} ] ;make them all empty strings.
then I process/append info into the different groups a,b,c,d.
Now, I want to write each string/list to a file of the same name.
i.e.
  foreach y x [write to-file join y ".txt" ??GETVALUE?? y]

Can someone clue me in on what I do at the ??GETVALUE?? position?

Thanks peoples.
Anton:
12-May-2005
Volker, in english, it seems better to write
	'facet of face    (where OF is the function in between)
but we can't do that...
How about TAKE ? ie.
	take 'facet face    ; (read in english: "take 'facet from face")
Anton:
13-May-2005
Well, I was just able to do this with no error:
>> port: open serial://port2/9600/8
>> close port
Graham:
13-May-2005
now, how do I send a page feed to the printer ... ?
Graham:
13-May-2005
oh well, it doesn't do what I need it to do.
Gregg:
13-May-2005
That is pretty crazy Allen. Doesn't seem like it could be too hard 
to do.
Graham:
13-May-2005
Let me rephrase that.  I am using a POS program which I downloaded. 
 When it prints a receipt to my serial printer, it fails to cause 
the printer to print the full printer buffer.  But when I close the 
POS program down, the printer then spits out the rest.


I have downloaded the Builder C++  source ( but it won't compile 
without errors :(    ).  I thought I would try and use Rebol first 
to send commands to the  printer to see what I need to do to force 
the printer to print the contents of it's buffer.  It's not the pc 
buffer as I turned off the fifo buffers in the serial port settings 
to see what the problem was.
Micha:
14-May-2005
how do to check or cloned harbour is open ?how do to check or cloned 
harbour is open ?how do to check or cloned harbour is open ?how do 
to check or cloned harbour is open ?
Allen:
28-May-2005
for me, FOR is only there when one of the native looping structures 
doesn't suffice. 

But I do like then dialect options you present. My pref would be 
to keep the value outside (to keep closer to foreach syntax)., 
ie  for i [1 to 9 step 2][..]
Gregg:
28-May-2005
Volker, it should operate on series values as well, like FOR does 
today. My examples are all numbers, because that's easier to do concisely. 
:-)
Allen:
31-May-2005
I'm curios as to why do people use @ in a username.? I thought the 
rfc said not to.
ChristianE:
1-Jun-2005
This probably is a silly question, but ... What is the benefit of 
DO GET IN OBJECT WORD over just writing OBJECT/WORD ? 

I see this a lot in VIEW source (e.g. in DO-FACE) and related guru 
sources. I really don't see the point of doing so, be there *must* 
be a reason. Anyone willing to educate me? Is this a path evaluation 
issue?
ChristianE:
1-Jun-2005
Still don't get it. Both 


 do-face: func [face value][do get in face 'action face either value 
 [value] [face/data]]

 do-face: func [face value][face/action face either value [value] 
 [face/data]]

seem to work.
BrianH:
1-Jun-2005
Plus, the behavior of object/word depends upon what datatype the 
word is set to and (for some datatypes) which version of REBOL you 
are running. If WORD is set to a block, OBJECT/WORD is the same as 
GET IN OBJECT 'WORD, while if WORD is set to a function, or sometimes 
a path or paren, it means DO GET IN OBJECT 'WORD. By spelling out 
what you want to do, you won't be as tied to variances in REBOL path 
evaluation and your code can be more general.
Graham:
6-Jun-2005
DideC has a script somewhere that allows you to examine your mail 
box and delete selected email.
I do too, but mine is part of a larger anti-spam package.
MikeL:
10-Jun-2005
You could use Andrew Martin's map function to achieve this

do http://www.rebol.org/library/scripts-download/arguments.r; 
Needs

do http://www.rebol.org/library/scripts-download/map.r; Instantiate
map func [a][2 * a] [1 2 3 4 5 6] ; supply the function to map
>>[2 4 6 8 10 12]
MichaelAppelmans:
11-Jun-2005
well, i'll do that to, but if I have to forward one to someone its 
easier if its in an inbox. at this point i've been up too many hours 
in a row to think straight, so I'm just trying to preserve everything 
in statis in case we have to revisit the "evidence".
Henrik:
16-Jun-2005
Working with INDEX? often, it annoys me that it can't handle none! 
values. If I for example want the index for a value and in some cases 
the value can't be found:

index? find [a b c] 'd


FIND returns none!, which INDEX? can't handle. I would have liked 
to see INDEX? also return none! or false! (like FOUND?) rather than 
an error. It gives a better flow and the same opportunity for checking 
on your FIND result, but you don't need to handle the error.


The reason I'm pointing this out is that some functions tend to go 
hand in hand, such as INDEX? FIND, and I think it would be nice that 
no errors ever occurred here in all naturally occuring states.


LENGTH? can sometimes be a bit of a pain with that too. What do you 
think?
BrianH:
18-Jun-2005
The former being the version you could do if null handling were added 
to index?, the latter being the way you can do the same thing now.
Volker:
18-Jun-2005
thats one way to see it, which i partly share.

but with series its the same kind of exception, and Gabriele argues 
we could deal with it like we do with series: give none and trap 
on access.

and the "flow" in such cases is to use the patterns i showed, with 
'if or 'any. and not forcing an extra assignment.
Romano:
23-Jun-2005
Ladislav: "what is "the shortest" reverse of:     y: to integer! 
x: #{80000000}"

debase/base to-hex y 16

is the fastest i know, i do not know about the shortest
[unknown: 5]:
8-Jul-2005
Is there anyway to get the ip address of the local computer?  My 
problem is that I use a VPN for some functions and have other techs 
that do also and wanted to make a utility that could simply determine 
what subnet they are on.  Problem is that I get the local ip of the 
lan and not the other interface ip's.  Anyway to get those?
[unknown: 5]:
8-Jul-2005
This is one of my more major problems with REBOL - it is an internet 
language as advertised so you assume tasks like this would be simple 
or for example enumerating connected or listening ports, retrieving 
a routing table etc.  At least I can use call to get some other application 
to do it for me.
[unknown: 5]:
8-Jul-2005
yeah I know I actually have to do that now with a call to netstat 
-aon
JaimeVargas:
8-Jul-2005
You could always use CALL to get the open ports on the host system 
and the parse it. What OS? Do you want support for?
[unknown: 5]:
8-Jul-2005
Therefore, I see no way to penetrate the REBOL product into the environment 
unless I make a killer app or unless we can do the better work with 
REBOL at the same costs or better.
Brett:
10-Jul-2005
For POP3 and email fans:


   http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=do-pop-scheme.r


Gives you easy access to LIST, TOP, UIDL, etc. for your spam delete 
scripts or whatever.
Graham:
10-Jul-2005
A lot of people will appreciate this Brett.  I haven't looked at 
the code yet, but just read the docs.  Do you want to add support 
for the "CAPA" command ?
Brett:
10-Jul-2005
If I was to add CAPA support, I would not do anything special with 
it, I'd just send it and get the response expecting the user script 
to know what to do with CAPA. But, I don't know if that is enough 
flexibility to be useful to a user script.  The other change that 
CAPA would bring is, that I should not issue a STAT automatically 
after authorisation.  Might need to look at this more. Have you used 
it and what for?
Chris:
12-Jul-2005
Security question: LOAD no longer evaluates values when loading. 
 But can it still load destructive values?

>> args: load/all {#[function! []['value]]}
== [func []['value]
]
>> args/1
== value

I'm not sure as values such as functions aren't bound:

>> args: load/all {#[function! [][print "Don't Print Me"]]}
== [func [][print "Don't Print Me"]
]
>> args/1
** Script Error: print word has no context
** Where: 1
** Near: print "Don't Print Me"


So, how dangerous can args/1 be?  I wouldn't be so careless as to 
-- do args -- or -- context args -- but I don't want to have to worry 
about, say:

if args/1 = 6 [...] ; or
if args/1 = 'value [...]

Though -- first args -- appears to be safe:

>> first args
>>
Ingo:
25-Jul-2005
Q1: I want to replace all 'none in a block with _different_ empty 
strings, what's the fastest way to do this?

(replace/all BLOCK none ""       replaces all 'none with the same 
empty string)
Ingo:
25-Jul-2005
Q2: I have to blocks containing strings, and want to find out which 
of these strings differ (I need all differing positions), what do 
you think is the fastest way to achieve this?
Anton:
26-Jul-2005
Ingo, I have similar feelings too sometimes. I need a higher level 
function to do some things like that, but it's not there....
Brett:
26-Jul-2005
But if you do need to do an actual replace on the original block 
- see the other solutions :-)
Henrik:
30-Jul-2005
Are there any other instances where the a: copy [] vs. a: [] "problem" 
appears?

I'm have a bug where two arrays:

1. an array with data that can be manipulated

2. a similar one containing default data, which is used whenever 
I want to reset the first one


They apparently "stick" together with synchronized values. When I 
manipulate array 1, array 2 changes too. This would be the old COPY 
problem, but I use COPY everywhere, whenever I need to create array 
2.


However I do frequently PICK values from array 2 and POKE it in array 
1 at the same location to reset a specific location to a default 
value. Would that create a similar problem?
Volker:
8-Aug-2005
hmm, not sure what you want to do. the words in the header are not 
bound to the locals, just names. only the words in the body are bound. 
done by 'func.
Pekr:
21-Aug-2005
When will open/seek be added? It was supposed to be there with new 
async core, we had async core for a while, but I do not remember 
anyone mentioning open/seek is there ...
Ladislav:
21-Aug-2005
note: although it looks safe, it may become a victim of the GC bug 
I described in RAMBO group recently. A slower but safer implementation 
is:

default: func [
    {Execute code. If error occurs, execute fault.}
    [throw]
    code [block!] {Code to execute}
    fault [block!] {Error handler}
] [
    either error? set/any 'code try code [
        do make function! [[throw] error [error!]] fault
    ] [get/any 'code]
]
Ladislav:
21-Aug-2005
sorry, correction:

default: func [
    {Execute code. If error occurs, execute fault.}
    [throw]
    code [block!] {Code to execute}
    fault [block!] {Error handler}
] [
    either error? set/any 'code try code [
        do make function! [[throw] error [error!]] fault code
    ] [get/any 'code]
]
Volker:
22-Aug-2005
To me the "sfae but slow"-version with 'do looks more elegant. i 
doubt it is slower. but i may compare the wrong sources, lots of 
them..
Pekr:
24-Aug-2005
that should be easy to test, will do so tomorrow ...
eFishAnt:
27-Aug-2005
going from VID to literal-words...to do comms syncing...so say a: 
"cat" and b: "dog"  I want [cat [dog]] NOT ["cat"["dog"]]
Volker:
27-Aug-2005
problem here is, we need do/next to know how long one experession 
is. but before do/next, we can not reduce subblocks. that should 
be done only for one expression. but we do not which blocks before 
do/next.. maybe it should be really inbuild?
Volker:
27-Aug-2005
What did i write? Trying explanation again.. We need do/next to know 
which blocks are in the next expression. Then expand only these. 
But by using do/next, we have already used the old, unreduced blocks..
Volker:
27-Aug-2005
So the workarounds is to expand all blocks at once, either before 
reducing that level or after. breaks a bit semantic, means do not 
depend on evaluation-order.
Brett:
29-Aug-2005
reduce-deep: func [
	block [block!]
	/local queue result file eval-state sub-result
][

	; Initialise
	queue: make list! 10
	result: reduce []


 ; Loop until we exhaust all unfinished blocks and we exhaust current 
 block.
	until [

		either empty? :block [
			; If finished this block, but more to process - add our
			; result to higher block result and set that block as current.
			if not empty? queue [
				set/any 'sub-result get/any 'result
				set [result block] queue/1
				insert/only tail result get/any 'sub-result
				queue: remove queue
			]
		][

			; Process current block item.

			either block? block/1 [
				; Save current level to process later,
				; set this new block as current.
				queue: head insert/only queue reduce [result next block]
				result: reduce []
				block: block/1
			][
				; Evaluate item.
				eval-state: do/next block
				insert/only tail result eval-state/1
				block: eval-state/2
			]
		]

		all [tail? block tail? queue]
	]

	; Return final result
	result
]
Graham:
31-Aug-2005
My primary scsi hard drive in my server killed windows 2003 somehow. 
 It fails the seagate diagnostics though the seatools can't identify 
the drive.  I put in another scsi drive but even though they all 
have different ids, the new windows 2003 server dies when I reattach 
the old drive ( i want to recover files off it ).  It just reboots 
even in safe mode.  Anyone any ideas as to why it should do that?
Geomol:
5-Sep-2005
context question:
If I inside a context block (an object) in one program write:
do %some-program.r

then I can't reach words and functions in the first program from 
the second. I've also tried to bind words to the first context, but 
without luck. Any ideas? Maybe I should put 2 small test-scripts 
here:
Geomol:
5-Sep-2005
So I do
#include %prg2.r
inside mycontext in prg1.r? And then write
include %prg1.r
to run it?
Geomol:
5-Sep-2005
The functionality is very usefull. (Maybe your include can do a bit 
too much. I like it simple.) Maybe I could just do %include.r at 
the start of canvas.r, so people doesn't have to do it in their user.r 
files. Or I should go another way and make it one big file for now!? 
Hmmm well, I would like to do modules later on, so only the parts 
needed is included.
Geomol:
5-Sep-2005
But as I understand it, rebol doesn't allow contexts to be mix-matched, 
like I would like to do with a simple: do %something.r
Ladislav:
5-Sep-2005
There is a way how to do %include in your files, if required, of 
course
Geomol:
5-Sep-2005
How do I use INCLUDE to make one big file from scripts?
Ladislav:
5-Sep-2005
(which contains everything necessary to DO it)
Gabriele:
5-Sep-2005
but if you have nexting contexts, you're going to need multiple binds. 
also, while DO changes dir to the script's location, LOAD doesn't. 
so there is a difference. but, you can get into this kind of problems 
with #include too.
Anton:
12-Sep-2005
; original simple functions
;;++: func ['a][do compose [(to-set-word a) (a) + 1]]
;;--: func ['a][do compose [(to-set-word a) (a) - 1]]
;;+=: func ['a 'b][do compose [(to-set-word a) (a) + (b)]]
;;-=: func ['a 'b][do compose [(to-set-word a) (a) - (b)]]

;++: func ['word][set word 1 + get word]
;--: func ['word][set word -1 + get word]

; handles paths 

++: func ['v [word! path!]][do reduce [either path? v [to-set-path 
v][to-set-word v] v '+ 1]]

--: func ['v [word! path!]][do reduce [either path? v [to-set-path 
v][to-set-word v] v '- 1]]

+=: func ['v [word! path!] value][do reduce [either path? v [to-set-path 
v][to-set-word v] v '+ value]]

-=: func ['v [word! path!] value][do reduce [either path? v [to-set-path 
v][to-set-word v] v '- value]]
Ingo:
12-Sep-2005
Ahh, I see ... most of the time I try things like 

>> del <tab><tab> to see if there are other words like the one which 
_just_ does not do the job, but I forgot it this time. :-)
Graham:
12-Sep-2005
what happened to Rebol's pattern matching in files?

I used to be able to do 

load %*.html 
well, that was valid in the year 2000.
Pekr:
13-Sep-2005
Hi .... as me and my friend use RebDB, we currently have to simulate 
'join functionality. I gave the idea a little thought, and I remembered, 
there are Rebol natives as 'union and 'intersest. They even do work 
with /skip refinement ..... and we miss that 'join functionality. 
Would it be difficult to add such functionality to work with blocks 
for 'union, or have a new native? I have an example:

; structure - name, last name, address, zip code

table1: [ "Petr" "Krenzelok" "Navsi 645" "739 92"  "Johny" "Handsome" 
"Dreamland 777" "777 77"]

; structure - age, place of birth
table2: [ 33 "Trinec" 38 "Some town"]

join-block/skip table1 table2 4 2


Do you think it would be usefull functionality to have as a native? 
Would be fast and would give us db 'join functionality to some extent 
....
Sunanda:
13-Sep-2005
strange isn't it?
same? o1/block o2/block
== true
But if you change the spec to
  block: copy [do [a]]

They are no longer the same, but still return the same value. Odd!
Gregg:
13-Sep-2005
My view is that Carl made this a conscious choice, knowing that advanced 
users could do their own copy/deep when they need to, and it won't 
come up most of the time anyway.
Gregg:
13-Sep-2005
And, yes, I think it might be OK for CONTEXT to do a copy on the 
spec; I wouldn't even add the no-copy option,.
Gregg:
13-Sep-2005
Why? I don't have to know anything about how REBOL's GC works, do 
I? If *everyone* has to understand and adjust to async, and if even 
10% of people need to know how closures work, that would be a tragedy.
Ladislav:
13-Sep-2005
you do not *need* to know how closures work, the only thing you need 
to know is, that when you use a closure instead of a function, some 
bugs vanish
Gabriele:
13-Sep-2005
that has nothing to do with append - that has to do with list!s.
Graham:
15-Sep-2005
Do you mean, do the easy things first and leave the hard stuff to 
later?
PhilB:
18-Sep-2005
How do send an email and cc a second email address 
I tried this

lv-header: make system/standard/email [
    to: [test1-:-somehost-:-com]
    cc: [test2-:-gmail-:-com]
]


send/header/subject [test1-:-somehost-:-com] "This is a test" lv-header 
"Test Subject"

but the email gets sent to the to address but not the cc address.
Geomol:
19-Sep-2005
I have a question about the order of arguments to a function. I wanna 
hear your opinion. I'm programming REBOL versions of some of the 
Amiga graphics.library functions. BltMaskRGBMap is a function of 
mine, that will copy part of an image at a certain position and size 
to another image through a mask. It takes the arguments: source image, 
source position, destination image, destination position, size and 
finally mask. That would be the order of the arguments, if it was 
an Amiga graphics.library function. But in REBOL, destination is 
often (always?) first, so maybe I should switch source image and 
position with destination image and position? What do you think would 
be the better way for a REBOL programmer?
Graham:
19-Sep-2005
Is 'rejoin trying to do some datatype conversion?
Ingo:
22-Sep-2005
Why do I get an error "invalid argument" here?


>>       comp-length: func [a b][compare (length? a/2) (length? b/2)]
>>       sort/skip/compare files 2 :comp-length
** Script Error: Invalid argument: 2
** Near: sort/skip/compare files 2 :comp-length
>> source compare
compare: func [

    {compares to values, and returns -1 / 0 / 1 for values a<b / a=b 
    / a>b}
    a b
    /local return
][
    case [
        a > b [-1]
        a < b [1]
        true [0]
    ]
]

REBOL/View 1.3.1.3.1
Graham:
24-Sep-2005
not core .. but I wonder what RT has to do to make use of dual core 
CPUs.  Is this an OS, or an application thing?
Group: Dialects ... Questions about how to create dialects [web-public]
Robert:
12-Jan-2005
The next question is: How do I provide only the second integer!? 
I would like to use NONE for skipped paramters. How can I handle 
this. I tried to add word! and than provide none but this will be 
parsed into a word! but NONE? returns FALSE...
Robert:
15-Jan-2005
Yes, right that's what I'm going to do. Thanks for the CSS tipp, 
I take a look at.
Maxim:
22-Mar-2006
IMO nothing to do with dialect... AFAICT they are simply structured 
xml definitions...
btiffin:
15-Sep-2006
Requesting Opinions.  Being a crusty old forther, I really really 
miss the immersive nature of the block editor environment.  Coding 
in forth meant never leaving forth.  Editor, debugger, disk drivers 
etc... all forth commands.  No need to ever have the brain exit forth 
mode.  Now that Rebol is my language of the future, I kinda pine 
for the past.  The wonder and beauty of Rebol keeps being interrupted 
by decisions on what to use to edit that last little bit of script. 
 Notepad, Crimson Editor, Rebol editor? A small annoyance but it 
still disrupts the brain from getting to streaming mode.  So now 
to the question.  My first crack at a forth block editor dialect 
failed miserably.  Dialects need to be LOADable for parse to function. 
 Editing source code makes for unloadable situations.  Do I just 
give up on it and learn to live in the third millenium?  Write a 
utility that doesn't use dialects (which seems to unRebol the solution)? 
 I thought I'd ask you guys, just in case there is a light shining 
in front of me that I can't see.  Thanks in advance.
Graham:
15-Sep-2006
forth editors used to access the hard drive sectors directly.  You 
want to do that?
Anton:
15-Sep-2006
How do you launch rebol otherwise ?

I've set up my start menu so it's a few key presses away. The sequence 
is: Ctrl-Esc (to open the menu), down right down enter. (Actually 
now I think about it, I can reduce this a little bit.)
Volker:
15-Sep-2006
I am not sure where your focus is.
Editor-dialect: put the edited code in strings, like
[ #1 {io-code} #2 {gui}]

Patch the inbuild editor to load and store there, instead iof storing 
to files.

And from the console a simple "ed #2" would edit it. but still in 
a seperate window.

Console: Or is it about that seperate window, do you want inside 
that rebol-console-window? More work, but rem-edit does that, maybe 
its author would help with fixing.
Gregg:
21-Sep-2006
My preference is to use block parsing whenever possible, and trap 
errors so you can warn if something isn't valid. Block parsing is 
just so much more powerful than string parsing, it's hard to give 
it up.


Of course, there are improvements I would like to see, so more "normal" 
text can load successfully; things like 50%, or 33MPH. Maybe R3 and 
custom datatypes will offer something in the area of expanded lexical 
forms. In any case, we should identify the most important things 
that don't load today and see if RT can do something about them. 
:-)
Maxim:
21-Sep-2006
funny, in experience, I find it easier in many cases to do a hybrid 
model.  one where you load the string into some block you can then 
more easily parse.  There are many kinds of real-world data which 
is not easily loadable in REBOL and in cases where you must make 
a dialect over some outside data... blocks are rarely useable.
Gregg:
22-Sep-2006
Issues can actually contain spaces, but they don't parse or mold 
that way. i.e. the datatype can hold them, but the lexical form doesn't 
allow it. Meaning you can get bitten, but do tricky things. :-)

>> a: #This issue has spaces in it
** Script Error: issue has no value
** Near: issue has spaces in it
>> a: to issue! "This issue has spaces in it"
== #This
>> probe a
#This
== #This
>> b: to string! a
== "This issue has spaces in it"
Geomol:
23-Jun-2007
Gregg wrote (in group Rebol vs Scheme):

I would *love* to see mini-primers on language design for Lisp, Forth, 
Logo, etc. in REBOL.

I've taken the first step for a BASIC dialect:

do http://www.fys.ku.dk/~niclasen/rebol/basic.r

It only knows a few commands so far: auto list new old
And these statements: end goto print rem run
And these functions: cos sin
Gregg:
24-Jun-2007
Very cool John. Now, let me throw another thought into the mix, just 
for fun. 


If you were to write a language interpreter long ago, you would do 
it in a low level language like ASM or, later, C. In those languages 
you didn't have high level constructs like we have in REBOL. Certain 
languages have very specific models; consider Lisp and Forth, each 
has a few core definitions and the rest of the language it built 
on those. Lisp has lists, Forth has blocks, etc. 

With REBOL, we can do things in many ways. 


1) Leverage all REBOL has to offer. For example, how hard would it 
be to write a simple Lisp system if you (basically) use blocks for 
lists and supply a few standard Lisp functions? Is eval'ing a Lisp 
paren/list different than DOing a REBOL block?


2) Write lower level code, simulating how you would have to write 
a language using something like C or ASM. You could go as far as 
writing a simple virtual machine with its own set of ops.


3) Write dialects that are designed for building specific kinds of 
languages, showing the core concepts of languages, where they're 
similar, and where they differ; tools for teaching language design. 

I think all of those approaches have something to offer.
[unknown: 9]:
24-Jun-2007
I think that making a Basic interpreter in Rebol is more useful, 
powerful, and educational than almost any other endeavour I have 
heard regarding Rebol (ever!).


-	People like the idea of Basic.  
-	Almost all programmers know some Basic
-	Although "basic" it tells programmers this is simple to do.
-	It is a great way to learn a dialect.

-	It has "news worthiness" would be good to write a compete dialect, 
and post on SlashDot.

-	If you can run QBasic - it would me instantly thousands if not 
millions of applications that could run instantly on any platform. 
Probably all would be faster even with graphics.
Geomol:
24-Jun-2007
This Basic dialect parse in block mode, and this set some restrictions 
on the syntax, but it's probably faster and easier to program the 
parse rules. To make a QBasic would require, I used string parsing. 
Probably the same for most other languages. Unfortunately I don't 
have much time for this project atm., because I have 3 examins in 
the coming week, and after that I'm on vacation for 2 weeks. But 
I would like ot do more of this. Maybe we could make a real project 
with some goals!?
Geomol:
24-Jun-2007
I added a few new things to the BASIC:

added DELETE command, added arguments to LIST, added STOP statement 
and some more (see source). Example of use:

>> do http://www.fys.ku.dk/~niclasen/rebol/basic.r
connecting to: www.fys.ku.dk
Script: "BASIC" (24-Jun-2007)
BASIC

>auto 5 5
    5 print "Line 5"
   10 rem goto 20
   15 blab
   20 print "Line 20"
   25 stop
   30 0
>run
Line 5

Mistake at line 15
>10 goto 20
>run
Line 5
Line 20

STOP at line 25
>
Gregg:
24-Jun-2007
Web public. Yes
Gress = Gregg. NP :-)


QBASIC - Ahhh, now we get to have some fun. QBASIC is not your old 
fashioned, line-numbered BASIC. I think it would be cool to do both, 
but the Q(Quick)BASIC language is much better for writing programs 
that actually do something. I've been tempted to do something like 
that myself. To actually run exisiting QB code, screen access would 
pretty much be a must-have feature. Nothing like those old character 
mode interfaces you know.
Geomol:
17-Jul-2007
How do we best get this rolling? I'm interested in making some language 
interpreters in REBOL, because I see future potential. Reichart and 
Gregg talked about QBASIC, which I don't know. Where are the specifications 
for that language? BASIC is a start, and along the line, I would 
like to dig into other languages as well. Is it best keeping it all 
public, or should we make new groups for teams interested in this?
Geomol:
18-Jul-2007
Uploaded new version of BBC BASIC intepreter. Added expressions and 
conditions. Added IF and INPUT. Example:

>> do http://www.fys.ku.dk/~niclasen/rebol/bbcbasic.r
connecting to: www.fys.ku.dk
Script: "BBC BASIC" (18-Jul-2007)
BASIC v. 0.0.2 

>auto
   10 input "Name",name$

   20 if name$="Carl" then print "Hi " name$ else print "Hello " name$
   30 0
>run
Name?John
Hello John
Geomol:
18-Jul-2007
New version 0.1.0 of BBC BASIC. Added FOR ... NEXT loop. Example:

>> do http://www.fys.ku.dk/~niclasen/rebol/bbcbasic.r
connecting to: www.fys.ku.dk
Script: "BBC BASIC" (19-Jul-2007)
BASIC v. 0.1.0 

>auto
   10 for a=10 to pi step -2.3
   20 for n%=1 to 3 step 2
   30 print a n%
   40 next
   50 next
   60 0
>run
                  10                   1
                  10                   3
                 7.7                   1
                 7.7                   3
                 5.4                   1
                 5.4                   3
Geomol:
19-Jul-2007
New version 0.1.1 of BBC BASIC. Added many keywords, mostly functions. 
To run:
>> do http://www.fys.ku.dk/~niclasen/rebol/bbcbasic.r

List of keywords: http://www.fys.ku.dk/~niclasen/rebol/bbcbasic.html
2501 / 1157812345...2425[26] 2728...112113114115116