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

World: r3wp

[!REBOL3-OLD1]

Pekr
24-Sep-2009
[18184x2]
write parsing CSV like input, there was a proposal to solve it via 
external function or decode-csv aproach, which could internally use 
parse.
for new parse rewrite, there is going to be default /all mode, and 
/ignore mode and even maybe /case, so dunno, if delimiters will be 
provided as with R2 parse ...
Henrik
24-Sep-2009
[18186]
I have a small CSV parse and CSV generator library that we could 
start from.
Steeve
24-Sep-2009
[18187x3]
Henrik, i hope we will not remove the splitting behaving of PARSE 
because actually SPLIT is damn slow
SPLIT has too much useless options and use other mezzanines (COLLECT) 
in his code, it why it's not a good mezznine to my mind.
Actually, i don't like mezzs which return block of data with unlimited 
sizes.

I like mezzs with async behavior, to treat each data set, step by 
step.
Dockimbel
24-Sep-2009
[18190]
I'm reading several times needs for CSV parsing enhancements, are 
they issues with parsing CSV files with R2's parse?
Sunanda
24-Sep-2009
[18191]
On example here -- the specific problem is the same in R2 and R3:
   http://www.curecode.org/rebol3/ticket.rsp?id=1042&cursor=2
BrianH
24-Sep-2009
[18192]
This highlights the actual change that would need to happen to PARSE: 
http://www.curecode.org/rebol3/ticket.rsp?id=1079
Dockimbel
24-Sep-2009
[18193]
Thanks, so it's parse's splitting ability that is causing an issue.
Pekr
25-Sep-2009
[18194x2]
Brian - it seems that Ladislav does not agree to your conclusions 
towards parse internals ... and Carl is all but silent :-)
It reminds me of old ML discussions of gurus, trying to find internal 
REBOL representation, and differing in opinion of how things are 
done under the hood.
BrianH
25-Sep-2009
[18196x2]
Carl revealed the internals, inadvertantly, earlier in that comment 
discussion. It was easy to figure out. Ladislav needs to read closer.
Back in 2000 I was one of those gurus on the mailing list, and my 
argument with Gabriele was the initial documentation for R2's context 
model and behavior. I was glad when Ladislav later fleshed out that 
discovery with more detail in his Bindology papers.
Pekr
25-Sep-2009
[18198]
I do remember guys like Tim Peters, Joel Neely, etc., Well, those 
were the times :-)
BrianH
25-Sep-2009
[18199]
:)
Graham
25-Sep-2009
[18200]
I remember Carl used to be on the mailing list ...
BrianH
25-Sep-2009
[18201]
I remember I used to be on the mailing list. Haven't been for many 
years now.
Pekr
25-Sep-2009
[18202x2]
I have a proposal - I think that we all know, that View engine itself 
needs few enhancements, which would be nice to have for the official 
3.0 release. I would like to create wiki page similar to Parse proposal, 
to which we could contribute our requests. What do you think?
I don't think Carl will work in View engine anytime soon, but having 
those things collected in one place would be surely good.
Graham
25-Sep-2009
[18204]
Sounds good ... and won't hurt
Pekr
25-Sep-2009
[18205x2]
I think that Cyphre can't work on View engine because of C code alignment. 
We have to wait, untill Carl isolates kernel and host, and releases 
the code. But then - even few small changes might make some difference 
in the end. I think that View engine deserves few weeks of additional 
developments ...
My favorites are:

- better font support
- ability to precisely measure font-size
- draw level events?
- move to Multimedia Timers
- transparent windows - just setting bits in API
- we don't use bitmap caching yet
- eventual switch to compound rasterizer
Maxim
25-Sep-2009
[18207]
my requirements are 

draw item word reference,   [target: circle 0x0 50 ]
draw item as objects,    [target/offset: 20x20]
vertice access & control,

key up events.
timers
BrianH
25-Sep-2009
[18208x2]
My preferences:

- Get it done
- Make it easy to use

- Use R3's existing timer system for long delays, and then multimedia 
timers for the last precise bit

- Get smart graphics people to help with the little details, but 
smart systems people for the overall design

- Make it so easy to use that I, as a non-graphics-person, can write 
GUI apps
Also, don't neglect R3's event system in favor of hooking in some 
external one. If there are problems with R3's system, fix them first.
Steeve
25-Sep-2009
[18210]
- Hookable system dialects (draw effect text)
So that we can add our own commands or hook some existing ones.
shadwolf
25-Sep-2009
[18211]
brianH yeah ... i always said new VID have to be as easy to write 
as previous vid for non specialist and  it serves even a greater 
purpose the GUI designers area. With easy made gob or panels (windows 
where you arange the gob to be displayed on screen ... ) the the 
designer output source produced with those tools remains easy to 
read.
Maxim
25-Sep-2009
[18212]
visual gui editing with row columns is pretty easy to build.
Steeve
27-Sep-2009
[18213x7]
i was trying the new parse commands...
I came with something existing, and said: Now, how can i do this 
more rebolish...

parse/case opcode [
	any [
		start: 
		| "nn" end: (change/part start get-byte end)
		| "+d" end: (change/part start get-d end)
		| "e" end: (change/part start get-e end)
		| skip
	]
]
Because change still doesn't work , the best i can do is that:

parse/case opcode [
    any [
          "nn" remove -2 (new: get-word) insert new
        | #"n" remove -1 (new: form get-byte) insert new
        | "+d" remove -2 (new: get-d) insert new
        | #"e" remove -1 (new: get-e) insert new
        | skip
    ]
]

What the gain ? nothing...
Forget CHANGE for the moment. Even with INSERT and REMOVE commands, 
i see things i don't like.

What i should able to write is that:

parse/case opcode [
    any [
          remove "nn" insert get-word
        | remove #"n" insert get-byte
        | remove "+d" insert get-d
        | remove #"e" insert get-e 
        | skip
    ]
]

Wich means:

- Remove "nn" if  "nn" is matched and insert the result of the function 
get-word.
or  Remove "n" ..
or  remove "+d" ...
or remove "e" ..
- Remove should use any rule as argument and not an obfuscated relative 
counter, because we don't have to calculate that. 

We know what matching rule must be deleted, we don't have to calculate 
is length more over.


- Insert should accept calculated values, it's obvious. If not it's 
useless.
When Change will work, I expect to be able to write:

parse/case opcode [
    any [
          change "nn" get-word
        | change #"n" get-byte
        | change "+d" get-d
        | change #"e" get-e 
        | skip
    ]
]
nothing more, nothing less
BrianH
27-Sep-2009
[18220x3]
First of all, Steeve, what you are suggesting is the original INSERT, 
CHANGE and REMOVE proposals. Which Carl said were infeasible to implement, 
which is why we have the new ones. Besides that, your example code 
is still too awkward. Try this:

parse/case opcode [
    any [ start:
          "nn" remove start insert (get-word)
        | #"n" remove start insert (form get-byte)
        | "+d" remove start insert (get-d)
        | #"e" remove start insert (get-e)
        | skip
    ]
]


If you are worried about change not working yet, don't be. It is 
still planned.
The change version of the above would be this:

parse/case opcode [
    any [ start:
          "nn" change start (get-word)
        | #"n" change start (form get-byte)
        | "+d" change start (get-d)
        | #"e" change start (get-e)
        | skip
    ]
]
If the paren value form hasn't made it into alpha 83, it will make 
it into a new alpha soon.
Steeve
27-Sep-2009
[18223x2]
Brian, Currentlty 'insert doen't accept parens as argument.
ah ok, you said that...
BrianH
27-Sep-2009
[18225x2]
Was a83 released last night?
The planned treatment of the value argument for insert and change 
is to be the same as that of quote.
Steeve
27-Sep-2009
[18227]
a83 released last night
BrianH
27-Sep-2009
[18228]
Oh, cool, I'll take a look :)
Steeve
27-Sep-2009
[18229]
but it's weird...
BrianH
27-Sep-2009
[18230]
Work in process, but how so?
Steeve
27-Sep-2009
[18231]
I don't understant, the following parsings should be equal but it's 
not, why ???

parse a: "abcdef" [
    any [
          "b" remove -1
        | "cd" remove -2
        | skip
    ]
]
print a
parse a: "abcdef" [
    any [start: 
          "b" remove start 
        | "cd" remove start
        | skip
    ]
]
print a
BrianH
27-Sep-2009
[18232x2]
Example of work in progress: The ? is likely to be renamed to =>, 
since that is the mathematical symbol for then (not greater-than, 
which is >=). However, => is not a valid word in R3 yet - the syntax 
parser needs to have that sequence of characters added as an exception, 
like <=. This was too mch work for the a83 release.
Answer to your question, Steeve: It's a bug.