r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[I'm new] Ask any question, and a helpful person will try to answer.

joannak
26-Dec-2009
[3283]
And I''ve never been so much on theory side..  I've preferered practical 
things..
Ladislav
26-Dec-2009
[3284]
Well, the attempt was to define the dialect to be as practical as 
possible, which certainly isn't an easy task.
joannak
26-Dec-2009
[3285]
As a practical ... I ment things like Embedded,  measurement  & control 
with some asm+c code, self-made wireless protocols etc.. Of those 
I know something (and got  my masterīs degree).
BrianH
26-Dec-2009
[3286]
The parsing model of R3 is based on a theory that didn't exist when 
I was last in college :)
Ladislav
26-Dec-2009
[3287x2]
To make you feel better: there are at least 20 proposals in the article 
I personally don't mind about (alternatives, that weren't chosen, 
as well as some keywords I do not plan to use).
Re the practicality: a good Parse dialect may be very practical (can 
be used to implement dialects, parse texts, match various patterns, 
etc.), but, at the same time, the design of it is rather a theoretical 
task.
BrianH
26-Dec-2009
[3289]
Which is happily over :)
Ladislav
26-Dec-2009
[3290x4]
Yes, although there is a possibility, that a new requirement/need 
appears.
But, anyway, I like the result so far.
The most recent Parse finding is probably CureCode #1401, which serves 
as a proof, that While is more "universal/fundamental" than Any (or 
Same), which may be found "crippled" in some situations, just because 
it "knows better than the user what to do" - I personally hate such 
software and am happy we convinced Carl to at least introduce the 
While keyword/operator.
errata: Same replace by Some
BrianH
26-Dec-2009
[3294]
All of the real parsing gurus are happy that while was added, and 
all of the parsing newbies will stick to any and some :)
Pekr
26-Dec-2009
[3295]
still the auto break from infinite loop with 'some ... is ... insane 
...
Ladislav
26-Dec-2009
[3296]
In other words, you are at the guru side too, Pekr
joannak
26-Dec-2009
[3297]
And I feel need of Huge set of examples and cookbooks just for the 
new parser..  (plus couple asperins)
Ladislav
26-Dec-2009
[3298x2]
:-D
Joanna, not that it is an easy reading, but..., did you look at http://en.wikibooks.org/wiki/REBOL_Programming/Language_Features/Parse
joannak
26-Dec-2009
[3300]
Aheemm.. How many different sites have these docs? officlas, unofficials, 
new old antiqued ?
BrianH
26-Dec-2009
[3301]
Too many. We're trying to move that stuff into DocBase (for community 
stuff) and the manual (for official stuff).
Graham
26-Dec-2009
[3302]
That was a community written book ... different purpose
BrianH
26-Dec-2009
[3303x2]
was
 ? :)
Oh, never ming, you;re referring to the wikibook.
Henrik
26-Dec-2009
[3305]
I helped starting the wikibook before R3 was announced. When R3 was 
announced, I though "well, damn, we'll have to start over, when R3 
is out in a couple of months." :-)
joannak
26-Dec-2009
[3306x2]
Just got the feeling..   was reading Wikibook..      Got this line 
(ok, it was explained, but still)   
  parse [-1] [1 1 -1]
Reminds me of those old days I used to whack together some nasty 
stuff with sed and awk ...  Thankfully I have forgotten most of those. 
:)
BrianH
26-Dec-2009
[3308x2]
parse [-1] [lit -1]
That's R3 though.
PeterWood
27-Dec-2009
[3310x3]
Some data on R2 -> R3 conversions. I have 824 unit tests for Rebol.org 
that which can be run on both Core 2.5.6 and the latest R3 Alpha. 
All 824 pass under 2.5.6. Under R3, 670 pass and 154 fail. The tests 
only cover 32 functions (out of the hundreds if not thousands in 
the Library system). 13 of the functions will require changes to 
run under R3, 19 won't/
From the liitle time I've spent looking at the rebol.org system in 
respect of converting it to R3, the code changes required seem to 
be very small (I've only looked at the cgi and core code, no View 
or VID).


The biggest problem would seem to be the  need to change the source 
code to UTF-8. MUch of the rebol.org code is pretty old and was written 
without attention to string encoding. The newer code is mainly ISO-8859-1 
"aware" and seems to be ISO-8859-1encoded. Some of the Rebol.org 
code won't load in R3 because it contains invalid UTF-8 characters. 
Changing the source encoding is trivial but with that comes the need 
to change all the data stored in Rebol.org to UTF-8 for it to be 
processed properly.
So Joanna, if you make sure that you always use UTF-8 encoding with 
Rebol 2 you should find few problems in later migrating to Rebol 
3.
joannak
27-Dec-2009
[3313]
So, I'd like to ask if there is any sureproof way of telling apart 
which scripts are for R3 and which are for older Rebols?  This may 
indeed be obvious question, but I try to ask these now as long as 
I can cause I'd expect these to be asked a lot by the time R3 is 
released.
Paul
27-Dec-2009
[3314]
I don't think there is currently.  The community should decide on 
the best method though.  I think simply changing the extension could 
be useful such as .r3   Other languages use extensions to differ 
between code version such as .c verses .cpp    However, another method 
is simply to put a stamp message in the header such as:

REBOL [
     Title: "My coolest Program"
     Stamp:  R3
]
Geomol
27-Dec-2009
[3315]
There is no such way. Some scripts work for many versions of REBOL, 
some don't. A way to tell is to use the NEEDS entry in the headers. 
See:
http://www.rebol.com/docs/core23/rebolcore-5.html#section-2

But it's not widely used.
Paul
27-Dec-2009
[3316x3]
I don't think Needs should be used for the version requirement but 
for external needs.
Those items should be separated from the version requirements.
Or I should say execution requirements of the script.
joannak
27-Dec-2009
[3319]
Id rather see it like

REBOL3[
	Normal headers here, as much as you feel the need
]
Paul
27-Dec-2009
[3320x3]
So  needs would be used with Stamp as this:

REBOL [
    Title: "My Coolest Program"
    version: 1.0
    Stamp: 'R3
    Needs: [2.0 ODBC]
]
I don't really have a problem with the REBOL3 way.  It seems this 
was discussed before and some valid concerns were raised but I don't 
recall what they were.
The problem I do see with using REBOL3 is that you then need to use 
REBOL3.1 etc... as new versions come out.
joannak
27-Dec-2009
[3323x3]
Thatīs true.  but I tend to belive it will be highly unlikely there 
will be as much important groundbraking changes on moving from 3.0 
to 3.1 as is from 2.6 to 3.0.
My point behind this forward/backward compatibility chat is primarly, 
that I'd like to see a way to stop average user on accidently loading 
old scripts on R3.  I'm sure the top-100 gurus of Rebol can dance 
their way around differences at will, but at the moment R3 (and R3/view) 
is released there will (hopefully) be considerable number of new 
users for Rebol.


Secondary would be giving an idea of a toolkit ( lint like script 
for Rebol  or perhaps some debug-mode at runtime? )  that would allow 
developer to see which parts of the code needs to checked/rewritten 
for R3 compatibility.
I do admit I have not searched trough old posts (blogs, vikis, archives. 
whtever is available) to see if this is obviously an old issue (and 
not necessary to talk again?).
shadwolf
27-Dec-2009
[3326x2]
other problem is the retro portablity 
....
all the scrpts made accross the 10 last years usng REbl 2 wll then 
not be usable with R3 ... Ans this have been discussed lke 2  years 
ago when carl proposed to do a major verson upgrade that was wth 
the discuton arund the "Because no one knows it  do i change rebol's 
name ?". It was sad to say that rebol after 10  yeas was stll in 
the underground limbus....
Sunanda
27-Dec-2009
[3328]
Many non View scripts will be portable with no, or little, change. 
This article discusses my earlier conversion experiences:
   http://www.rebol.org/art-display-article.r?article=j26z
Graham
27-Dec-2009
[3329]
Is this based on a small sample of your own scripts?  Any largish 
scripts tested yet?
Steeve
27-Dec-2009
[3330x2]
Well my motto is a little different.
structural complexity allows  functional simplicity

Wich means, more you make your code compact and fast , more your 
code is reused.
(sorry, wrong thread)
Graham
27-Dec-2009
[3332]
Seems to contradict the idea of using the least powerful language 
...