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

[REBOL] Re: Parse limitation ?

From: g:santilli:tiscalinet:it at: 8-Oct-2003 22:04

Hi Petr, On Wednesday, October 8, 2003, 6:57:38 PM, you wrote: PK> Well - I am not sure my example will be any slower, except the penalty PK> of extra function call. First, I pass it string at certain position and First of all, FIND searches char by char too. It's just way faster because it's native; but, if you end up searching the string n times, you get n*m complexity (where m is the size of the string), and this scales up so badly that in the end it gets slower than using a PARSE loop. Probably FIND is still faster for two or three alternatives. We'd have to test it. When the alternatives are just strings, you could speed up the PARSE loop using a charset, and I have the feeling that PARSE is as fast as FIND in such a case, so the PARSE solution would be n times faster for n alternatives. PK> Yes, I can imagine it, really. The problem is (at least for me), that I PK> am able to understand such grammar once someone creates it, but am not PK> able to come up with it to solve problem at hand. Will you blame us PK> little bit underskilled rebol programmers now? :-) Not at all, but you are underestimating yourself. ;-) PK> Sounds interesting. I am just curious, if e.g. html only (not trying to PK> complicate things with java-script for now :-) browser would be possible PK> with Rebol? IIRC Python has web browser. Just curious. The problem for a web browser is not HTML parsing, it's rendering. In my dream-future, I will finish the PDF Maker 2 and then write a HTML2PDF translator. Rendering in View would be possible too, but I'd like RT to offer us some kind of native rich text handling first... you see, I'm too lazy to do all of that myself. ;-) Who needs a REBOL web browser? I'd like an email client much better. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: