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

World: r3wp

[All] except covered in other channels

Gabriele
5-Jan-2009
[3105]
Proof that Joe Marshall did not understand REBOL at all: http://list.cs.brown.edu/pipermail/plt-scheme/2007-June/018753.html
Maxim
5-Jan-2009
[3106x2]
ouch
I like this sentence:   "and it saves the user a lot of work in learning 
your language (*if* he already knows lisp, that is)."
btiffin
5-Jan-2009
[3108x2]
Well Max; it's kinda why I keep asking for junk! data.  REBOL requires 
mere-mortals to understand REBOL datatype! to take full effect of 
the language.  Until REBOL can LOAD "$10,000,000.00"  I'm going to 
gripe every so often.  ;)
Oh, and it doesn't have to load as money!   just not trip on Syntax 
Error: Invalid money -- $10,000,000.00

So close ...  it even knew I was aiming for money!
Reichart
5-Jan-2009
[3110]
:)
Maxim
5-Jan-2009
[3111x2]
but brian, you have as much time as you want to get that  $10M  :-)

>> more-time: make time! 10000000
== 2777:46:40
and you know what they say....

time is money   ;-)
btiffin
5-Jan-2009
[3113]
lol
Gabriele
6-Jan-2009
[3114]
Brian: on that one, I'll never understand why you guys don't simply 
use string parsing. REBOL cannot just be able to understand anything.
Graham
6-Jan-2009
[3115]
Isn't Brian saying that he wants a junk! datatype to catch unrecognised 
data instead of R throwing an error?
Gabriele
6-Jan-2009
[3116x4]
right, and 1) that can't work 2) you can parse as string, use load/next, 
and use your own parsing when load/next fails.
when you start doing 2) you'll see why it can't be done in a *general* 
way and thus 1)
ie. it needs to be a parser designed for your specific application 
- it's a user interface thing, not a language thing.
if your users don't know rebol, then don't use a dialect as the user 
interface.
Graham
6-Jan-2009
[3120]
And if they're malacious users ... use string parsing
PeterWood
6-Jan-2009
[3121]
If they are users  ... use string parse ... even genuine users make 
mistakes
[unknown: 5]
6-Jan-2009
[3122]
>> type? load "$10'000'000'00"
== money!
btiffin
6-Jan-2009
[3123]
I want Joe the Plumber to be a home rebol.  REBOL is one step away 
from allowing normal people access.  This hit me when I was showing 
how easy REBOL was to a construction boss.  How they could be masters 
of their own domain.  They lit up like a christmas tree.  A few days 
later a $10,000.00 entry caused one of their little scripts to fail. 
 The lights went out, and instead of embracing becoming a home business 
script writer, they felt stupid, and when I tried to reexplain the 
use of tick versus comma, they just got pissed off and will never 
be budding REBOL home users. 


All of us here could handle 001101010110110110110110010101 and eventually 
get the machine to do what we want.  I'm aiming to open our favourite 
little engine so grandma could use it to write grocery lists and 
then little VID charts etc, etc.   If we keep that to ourselves, 
well, IMHO, REBOL will wallow in the usage numbers counted in hundreds 
not millions as I believe it could.


I could be wrong, but REBOL is too close to being usable by non-programmers 
to let this slip by without at least griping once every 2 months 
or so.  :)


In my little warped world, the REBOL console could be the home users 
"application framework".  Every inch closer to common text usage 
could add an untold number of people by making them feel enabled. 
 Less geek, more people.   Again, I'll admit, I could be wrong; maybe 
the art of scripting will always be for nerds.
[unknown: 5]
6-Jan-2009
[3124x3]
I assume that money can't use the comma because of incompatibility 
with parse.
I mean money usesit but load can't because of parse.
'Load can rip you off when it comes to parse:

>> a: load [$10,000]
== [$10.00]
Pekr
6-Jan-2009
[3127]
Brian: I am not sure, but what Gabriele might mean is, that such 
change is possible, but could have some consequences ....
[unknown: 5]
6-Jan-2009
[3128x2]
The search function is changing a bit.  I'm simplifying the look 
so that it is only two blocks:

db/search [logic][action]


There will no longer be a database block.  Instead a database and 
field will be inputed together such as:

db/search [my-base.field-name > 1][my-base.field-name]


In that example it would check the database called "my-base" and 
check its fieldname which is called simply "field-name" in the example 
above to see if it is greater than the value  of 1.  If it is then 
it returns the field-name value.
doh wrong group
btiffin
6-Jan-2009
[3130]
Well, technically the design does allow for more international usage; 
and that IS a good thing, but North Americans use commas.  I'll quiet 
down after this post and then repost to the issue in a few months. 
 I don't know really, but I feel a few small incremental changes 
could open up the field to more people not inclined to be programmers.


On a grander scale, for linguistics work ala Icon's power, being 
able to LOAD %somerandompoem.txt  and not worry about syntax errors 
could open up a whole new domain for REBOL.  That would require a 
junk! datatype, and sure there will be issues with correctness, but 
let the english majors worry about those.  Today they won't even 
bother to start, so there are no issues of correctness as there are 
no scripts.   But imagine some English professor or a theologist; 
LOAD %kingjames.txt and then using REBOL to do statistical analysis, 
right at the console.  A report could count how much non-REBOL data 
was in the books along with counting the times 'Moses was mentioned 
in 2 or 3 simple lines of code.


I'll stop dreaming now (for a awhile) and get back to the task of 
being a nerd.  S'alright.  ;)
BrianH
6-Jan-2009
[3131x3]
Money can't use the comma because of incompatibility with Europe, 
not parse.
Brian, load in Icon is more like READ, and Icon's analysis code is 
very much like REBOL's string parsing.
There is no equivalent to REBOL's block parsing in Icon, because 
code is not data in Icon.
Sunanda
6-Jan-2009
[3134]
Gabriele: <it needs to be a parser designed for your specific application 
- it's a user interface thing, not a language thing.>
Well said!

Turning raw, external, untested, characters into application-compatible 
data types is not trivial. It's something a language can help with, 
but the language cannot do it all.....especially when you add in 
another important stage: that of giving the user meaningful, context 
sensitive, error mesages if the characters need correcting in specific 
ways.
BrianH
6-Jan-2009
[3135]
We don't need LOAD to be relaxed (what a nightmare that would be!), 
we need commonly available library functions for parsing localised, 
sloppy user data. With those library fnctions we can stop the people 
from asking us to break LOAD.
Graham
6-Jan-2009
[3136]
Sounds like a good way to improve usability.
Gregg
6-Jan-2009
[3137]
I've asked before, but don't think I ever got an answer from Carl, 
if the money! lexicon couldn't be fixed to allow commas and dots 
to be used in either order, as group and decimal separators. Does 
anyone see a problem with that?
Graham
6-Jan-2009
[3138]
Probably the answer is to have decent widgets that filter the user 
input.   My bank just cheats and prevents any commas being entered 
into money fields.
[unknown: 5]
6-Jan-2009
[3139]
The comma is a sure fire  way to get past some parsing systems right 
now and possibly cause a crash.  Because of the following:

>> type? $10,000
== money!
>> $10,000 + 1
== $11.00
Graham
6-Jan-2009
[3140]
that's expected behaviour
[unknown: 5]
6-Jan-2009
[3141]
what is?
Graham
6-Jan-2009
[3142x2]
>> $11'000 + 1
== $11001.00
>>
$10,000 = $10.00
[unknown: 5]
6-Jan-2009
[3144]
yes but I don't think anyone new to REBOL  is going to expect 10,000 
dollar plus 1 to equal 11 dollars.
Graham
6-Jan-2009
[3145]
Carl was never concerned about money!
[unknown: 5]
6-Jan-2009
[3146]
lol
Graham
6-Jan-2009
[3147x2]
this is the failure of the REBOL development cycle.
if we have regular iterative release/development ... these issues 
could have been discussed and dealt with long ago.  Instead we have 
100s of issues, which are looked at every now and then, and it's 
just too much to handle at one time.
Chris
6-Jan-2009
[3149]
I wrote an 'as (possibly short for coerce) function for QM with the 
heady goal of recognising types from strings.  It isn't nearly as 
extensive as I'd like (if I were to do that myself, it wouldn't be 
nearly as efficient as I'd like), but the community could use an 
'as like function (with possible /next refinement):

	>> as integer! "1,000"
	== 1000
	>> as/next integer! "1,000 and 1"
	== [1000 "and 1"]
	>> as money! "$1,000"
	== $1000
	; note, this is not how 'as works in QM


And it should be independent and open source.  It's perhaps something 
the core language should not be burdened with...
Rebolek
7-Jan-2009
[3150]
Paul: 10,000 + 1 is 11, that's 100% OK, as comma is decimal delimiter 
here in Europe. And getting 10001 instead would be a terrible bug.
Gabriele
7-Jan-2009
[3151x2]
REBOL is one step away from allowing normal people access
 - Brian... is that step called AI?
So, let's do it this way. Please implement what you want LOAD to 
do using PARSE and LOAD/NEXT. Then we can discuss it.
btiffin
7-Jan-2009
[3153x2]
Ok;  I get the omens  ;)  REBOL3 went offline just as I had posted 
this ...


Ok, I wasn't going to speak to the issue for another 60 days, but 
 ;)

My main point is not making the life of rebols any easier.  The point 
is attracting mom, pop and non technically inclined academic types. 
 For instance;  imagine a CPU that refused to load a binary into 
a code segment if the image included non executable hexcodes.  I 
don't mean only loaded bits of it, it just halted.  Said chip would 
not garner a mass following.  Sure NASA and Boeing my buy them for 
their engineers, but normals would balk at such a thing.  Not even 
going as far as loading it and giving a chance for a debugger to 
examine the nasty bits would make it a non-starter for mass market. 
 I akin current REBOL from that angle (again, thinking about mom, 
pop, history professors and linguists)
rebol []
; load any garbage ... NOT recursive, JUST A QUICK EXAMPLE
; leaves nones littered about, misses spaces yadayda
loadall: func [data /local gs gb err ero val gn] [
    gs: copy data
    gb: copy []
    until [
        either error? err: try [set [val gn] load/next gs] [
            ero: disarm err
            print ["is err: " ero/arg2]
            append gb ero/arg2 append gb join " - " ero/arg1
            gn: gs: find/tail gs ero/arg2
        ][
            append gb val
            gs: gn
        ]
        any [none? gn empty? gn]
    ]
    gb
]

org: "12.3.2.2.2.2.3.32.2.2.22.3.2.32.2.23.23.23.2312212323. this 
is a test of $10,000,000.00 loadall sequence"
probe loadall org