Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Rebol# or Rebol on DotNET

 [1/10] from: andrew:martin:colenso:school at: 24-Dec-2003 22:40


Just been thinking through this, while learning how to write a Rebol parser in C# (it's very tricky without using Rebol's 'parse...). Looking at the lexer/parse combination, Rebol only seems to need a lexer, because the tokens are Rebol values. The only trickery is balanced braces {} for long string values, and balanced square brackets for blocks [], which could be handled by a stack in the lexer part. My questions are about the interface to .NET stuff. How would we fit Rebol and DotNET functions together? Internationalisation: is it OK to "expand" Rebol's definition of values? For example, a money! Datatype that allows British pounds symbol or Euro symbol? Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [2/10] from: andrew:martin:colenso:school at: 24-Dec-2003 22:40


Further thinking: It'd would be nice to have a rebol value that contains units. Like: 12% 50Km/H 60MPH 99.999% And the parts could be accessed like money! datatypes:
>> x: US$123.45
== US$123.45
>> first x
== "US"
>> second x
== 123.45
>>
For example:
>> x: 50Km/H
== 50Km/H
>> first x
== 50
>> second x
== "Km/H"
>>
Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [3/10] from: info:id-net:ch at: 14-Oct-2003 12:36


Even for time value. i.e. 10:00 Would be nice to get the hour or the minutes without parsing. ti: 10:00 ti/2: 30 --> ti: 10:30

 [4/10] from: hallvard:ystad:helpinhand at: 14-Oct-2003 22:05


Dixit "Philippe Oehler" <[info--id-net--ch]> (Tue, 14 Oct 2003 12:36:45 +0200):
>Even for time value. >i.e. 10:00
<<quoted lines omitted: 3>>
>ti/2: 30 >--> ti: 10:30
Seems to me the time! value already works like that:
>> a: 12:34
== 12:34
>> a/2
== 34
>> a/1
== 12
>> a/2: 44
== 44
>> a
== 12:44
>>
Hallvard

 [5/10] from: bry:itnisk at: 15-Oct-2003 11:48


>Internationalisation: is it OK to "expand" Rebol's definition of
values?
>For example, a money! Datatype that allows British pounds symbol or
Euro
>symbol?
One of the things I've thought about is if it were possible to consume a rebol script as an xml provider http://msdn.microsoft.com/msdnmag/issues/01/09/xml/default.aspx then one can use xml schema to define rebol datatypes, don't much care for xml schema, but the .Net implementation is actually useful, especially as one can do runtime translation between xml schema datatypes and .net datatypes.

 [6/10] from: maximo:meteorstudios at: 15-Oct-2003 9:45


> -----Original Message----- > From: bryan [mailto:[bry--itnisk--com]] > especially as one can do runtime translation between xml schema > datatypes and .net datatypes.
basically, we have to wait for the plugin architecture for custom datatypes... What I am designing is a series relationship mapping dialect function for liquid which maps indexes of two series. so you can say map [series-a 1 series-b 34] in this context, some datatypes will have subtypes, identifying their subvalues by name... somewhat like the date and time datatype can do.. thus an equivalent to value: mytime/hours you would first create the relationship with:
>> relationship: map [mytime 'hour value ]
and then can do any of the following: update relationship value update relationship mytime which will automatically (and speedilly) set the corresponding values within a series (or not, depending on the relationship) the map dialect should be able to detect series values and expect an index of some type when it finds one (including subtypes, like 'red 'green or 'blue for tuples, it is even possible that depending on the subtype used, some form of datatype conversion may occur, as an added benefit...). this is to allow liquids to patch to and from series directly... this is not yet done, but part of the eventual design. -MAx

 [7/10] from: nitsch-lists:netcologne at: 15-Oct-2003 16:44


Expanding rebol-syntax? I start having some trouble with this: do it this way. you need a current version of rebol specially when non-gurus talk to others. they try it, it works, they tell it, it breaks. rebol is meant for messaging between humans, and explainung about rebol should be part of the picture. currently rebol works very well (few exceptions). One should be very carefull to change things. each change may help a bit, but it needs an explanation everytime it is used ("it works this way, except except except..") for private fun "introducing new letters" is ok of course :) -Volker Am Dienstag, 14. Oktober 2003 01:08 schrieb Andrew Martin:

 [8/10] from: andrew:martin:colenso:school at: 24-Dec-2003 22:40


Volker wrote:
> "do it this way. you need a current version of rebol" > specially when non-gurus talk to others.
No, no! You need one of the beta versions of Rebol for your OS. (pre- Core 2.5.6 not so long ago) :) Andrew J Martin Attendance Officer & Grail Jedi. R(H)ash and impetuous... Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [9/10] from: andrew::martin::colenso::school::nz at: 24-Dec-2003 22:40


bryan wrote:
> then one can use xml schema to define rebol datatypes, don't much care
for xml schema, but the .Net implementation is actually useful, especially as one can do runtime translation between xml schema datatypes and .net datatypes. At the moment, I'm using .NET Regular Expressions to parse out R# (and Rebol) data types, as .NET will compile these regexp is native code upon loading (and I've got a good tutorial on Regexp in the PERL documentation). If you could provide XML schema definitions and a way to map on .NET regexp or some other way to map rebol values into .NET datatypes, I'll happily include them into R#.
> One of the things I've thought about is if it were possible to consume
a rebol script as an xml provider:
> http://msdn.microsoft.com/msdnmag/issues/01/09/xml/default.aspx
Hmmm, how would we represent something like: 12.5% or: print or: USD$123.45 or: £12.34 ; British Pounds & Pence. ? Block! values are sort of easy enough: <sequence> ; Or some other tag name? ; blah blah </sequence> Andrew J Martin Attendance Officer & Grail Jedi. Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/ DISCLAIMER: Colenso High School and its Board of Trustees is not responsible (or legally liable) for materials distributed to or acquired from user e-mail accounts. You can report any misuse of an e-mail account to our ICT Manager and the complaint will be investigated. (Misuse can come in many forms, but can be viewed as any material sent/received that indicate or suggest pornography, unethical or illegal solicitation, racism, sexism, inappropriate language and/or other issues described in our Acceptable Use Policy.) All outgoing messages are certified virus-free by McAfee GroupShield Exchange 5.10.285.0 Phone: +64 6 843 5095 or Fax: +64 6 833 6759 or E-mail: [postmaster--colenso--school--nz]

 [10/10] from: bry:itnisk at: 16-Oct-2003 0:58


I'm home right now with a fever, so I'm just gonna give a quick note of the fact that it is possible to use regular expressions inside of xml schema as well, as an extension of strings. However schema usage can be somewhat different than programmatic usage as you don't have the possibility of matching, matching again, checking against the results of two matches before you apply match three. Again the schema usage only seems to me like it would be useful in the context of consuming rebol as an xml provider.
> bryan wrote: > > then one can use xml schema to define
rebol datatypes, don't much care
> for xml schema, but the .Net
implementation is actually useful,
> especially as one can do runtime
translation between xml schema
> datatypes and .net datatypes. > > At the moment, I'm using .NET Regular
Expressions to parse out R# (and
> Rebol) data types, as .NET will compile
these regexp is native code upon
> loading (and I've got a good tutorial on
Regexp in the PERL
> documentation). If you could provide XML
schema definitions and a way to
> map on .NET regexp or some other way to
map rebol values into .NET
> datatypes, I'll happily include them into
R#.
> > > One of the things I've thought about is
if it were possible to consume
> a rebol script as an xml provider: > >
http://msdn.microsoft.com/msdnmag/issues/01/0 9/xml/default.aspx
> Hmmm, how would we represent something
like:
> 12.5% > or:
<<quoted lines omitted: 3>>
> or: > £12.34 ; British Pounds &
Pence.
> ? > > Block! values are sort of easy enough: > <sequence> ; Or some
other tag name?
> ; blah blah > </sequence>
<<quoted lines omitted: 8>>
> http://www.colenso.school.nz/ > DISCLAIMER: Colenso High School and its
Board of Trustees is not responsible (or legally
> liable) for materials distributed to or
acquired from user e-mail accounts. You can report any
> misuse of an e-mail account to our ICT
Manager and the complaint will be investigated.
> (Misuse can come in many forms, but can be
viewed as any material sent/received that
> indicate or suggest pornography, unethical
or illegal solicitation, racism, sexism, inappropriate
> language and/or other issues described in
our Acceptable Use Policy.)
> All outgoing messages are certified virus-
free by McAfee GroupShield Exchange 5.10.285.0
> Phone: +64 6 843 5095 or Fax: +64 6 833
6759 or E-mail: [postmaster--colenso--school--nz]

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted