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

World: r3wp

[All] except covered in other channels

Steeve
31-Mar-2009
[3391x2]
eh ?
(i don't understand)
BrianH
31-Mar-2009
[3393]
Even my compromise has been rejected as too slow. Use TRANSCODE/error 
in a loop if necessary, but otherwise come to accept that LOAD loads 
REBOL data, and whatever DECODE can load (which is *anything* in 
theory).
btiffin
31-Mar-2009
[3394]
Anton ... it's not (I don't think, but I guess it could be) lack 
of comprehension.  It's a desire to see REBOL usefulness expand beyond 
the borders of us 200 loyal fans.
>> book: load %somefile
>> sort book
>> length? unique book

etc...   Can you not see a linguist loving this?  And perhaps adding 
to the size of the REBOL user base?
>> account: [paid $10,000.00 to bob]
A general contractor would love to type that in.

It just seems so close to being a thing that could be done without 
too much fuss or bother if it was internal.

Everyone here in REBOL3 ... we could make REBOL "more" restrictive 
and magic would still happen.  Carl and we advocates don't have to 
worry about you/us lot.  We're hooked already.


For instance.   What if    ``\\ was made a special! datatype?  Would 
you complain?  Or just accept it as a new feature of REBOL?   I don't 
see what a catch-all foreign! would harm.   The lexical complexity 
of REBOL is wonderous, I don't see what could hurt if it was more 
human friendly to boot.

Pekr ... I grew up a commercial fisherman.   ;)
BrianH
31-Mar-2009
[3395x3]
As someone who writes some of the internals, I can tell you that 
internalizing the fuss and bother doesn't make it less bothersome. 
It's not magic: The overhead would be the same if we added it to 
TRANSCODE - we might as well write the REBOL syntax in PARSE.
Flexibility is slow. If you want to load another syntax, try something 
like this:
    install-codec fishing-jargon
    load %blah.fish
Theoretical functions of course, but LOAD will call DECODE, which 
will look for an installed codec that it passes the data to.
btiffin
31-Mar-2009
[3398]
Before I read this I was going to add ...

Feeling a little bit responsible for being this argument to the rebol 
community, in a small attempt to advocate for more users ...  I'd 
also like to say, that push come to shove; if the argument gets to 
a point of driving away the likes of Nenad, or Gabriele in some sense 
of disgust at the un-understanding of some of us versus the potential 
of a few thousand new faceless strangers that may be attracted to 
a "garbage loading dialect" language.  I'd vote to keep Doc and Gab 
happy and skip the faceless masses.   ;)
BrianH
31-Mar-2009
[3399]
Check out TRANSCODE/error.
btiffin
31-Mar-2009
[3400]
But ... I still don't see the performance hit of a lexical scanner 
that defaulted to "make foreign!" and continue whenever a position 
in the code would trigger a syntax error?  Or as Anton states ... 
is this an amazing lack of comprehension?


I've been working with Bison and Flex ... and from what I understand, 
this would not make the parse tree any more complex.  It would simply 
change the runtime semantics to "make foreign!" at every point where 
the scanner would fail.
BrianH
31-Mar-2009
[3401x2]
We want that failure in LOAD though - it's what makes it trustworthy 
and fast. Check out TRANSCODE/error, but keep in mind that code to 
cope with foreign data is much more complex than regular code. Beginners 
should stick to REBOL data.
Or to data loaded by codecs called by DECODE.
btiffin
31-Mar-2009
[3403]
Again ... I'll side with Doc, push come to shove ... but ... it can't 
be more complex than throwing a runtime error in an action! when 
given invalid datatypes, no?   foreign! on action! or evaluation 
would trigger a throw.  The only operation I'd allow is  to string! 
 or a test such as foreign?   But I'll now try and hold my tongue 
for another 2 months.   ;)
Izkata
31-Mar-2009
[3404]
In regards to my "Why not load as a string! ?" comment, I was thinking 
of some sort of load/safe refinement
BrianH
31-Mar-2009
[3405x3]
LOAD is safe already. The fact that it throws an error on bad data 
is what makes it safe.
We changed it to be even more strict in R3 to make it even safer.
The "more strict" is making LOAD/header actually require a REBOL 
script, if not the header itself.
Graham
31-Mar-2009
[3408]
I haven't followed this thread
btiffin
31-Mar-2009
[3409]
Ok, fine two minutes then.   ;)   "bad data" would be a new foreign! 
datatype.  No longer "bad".  It'd be no more a code hassle than doing 
email! + url!      Take the hit then.  But you still have a "valid 
REBOL series!" to play with.  Even with a $$10,000.00\\  floating 
around in the series ... semantically equivalent to email! or file! 
 out of context for those functions that require particular datums.
Graham
31-Mar-2009
[3410x4]
but usually you want to parse data knowing what datatypes you are 
expecting.
would it be possible to do a to-block on that data accepting only 
certain datatypes and anything else is coerced to string?
eg telephone numbers are recognized as invalid time values
>> to-block "  345-6789  "
** Syntax Error: Invalid date -- 345-6789
** Near: (line 1) 345-6789
>>
BrianH
31-Mar-2009
[3414]
Foreign data will have codecs. No need to try to treat it like REBOL 
data. The foreign! type is the worst possible situation, since it 
would take the overhead of dealing with foreign data away from the 
actual input proces, and add that overhead to every bit of REBOL 
code that called LOAD, because LOAD would no longer be trustworthy.
Graham
31-Mar-2009
[3415x2]
or perhaps rebol by adding a telephone number data type
fix rebol
BrianH
31-Mar-2009
[3417]
Right now you can count on LOAD returning REBOL data, or an error. 
This is what makes LOAD trustworthy enough for DO.
Graham
31-Mar-2009
[3418]
seems a significant omission ...
BrianH
31-Mar-2009
[3419]
Really? Do you mean #1-773-555-1212 ?
Graham
31-Mar-2009
[3420]
how many times do you see phone numbers like that in real data ?
BrianH
31-Mar-2009
[3421]
In REBOL data, plenty. I thought we were talking about LOAD, not 
input processing.
Graham
31-Mar-2009
[3422]
to block is clearly evaluating
BrianH
31-Mar-2009
[3423x3]
Processing UTF-8 to parse REBOL data, yes.
I say UTF-8 because this is R3 LOAD we are talking about - R2's LOAD 
won't change again.
Listen, we had this discussion before and the compromise endied up 
being TRANSCODE/error (added in alpha 39).
Graham
31-Mar-2009
[3426x3]
Is the r3 group?
this
didn't know that
Anton
31-Mar-2009
[3429]
Yes, I've noticed the same arguments put forward as before.
Graham
31-Mar-2009
[3430]
Oh well, we need a FAQ then !
BrianH
31-Mar-2009
[3431]
This discussion pertains to R3, since it is a request for changes 
to REBOL. R2 isn't changing.
btiffin
31-Mar-2009
[3432]
I'll do the same thing in another 2 months or so ...  It's a new 
quirk of mine Anton.   ;)  I'll continue to do so until the kids 
on compsci.ca see REBOL as a worthy thing to study, instead of writing 
it off with comments like  "I can't stand the syntax".
Anton
31-Mar-2009
[3433]
That gets really tiresome.
Graham
31-Mar-2009
[3434x2]
someone will accuse you of trolling
some of us just have short memories!
BrianH
31-Mar-2009
[3436x2]
No Brian, you won't because Carl already made the change in alpha 
39, and is currently writing DECODE.
Even my compromise from the last time you brought this up was rejected. 
TRANSCODE/error and codecs is what we got. Live with it.
btiffin
31-Mar-2009
[3438]
I'm doing it with well meaning intent.  I really do struggle trying 
to get young up and coming university students to give REBOL the 
chance I know it deserves.  And sorry Brian, I've haven't tried A39 
yet.  I'm still running the A33 for Linux.
BrianH
31-Mar-2009
[3439x2]
Well, I already rewrote LOAD to take advantage of the TRANSCODE changes. 
It should go in the next build.
This includes LOAD/next, btw.