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

World: r3wp

[Rebol School] Rebol School

Henrik
6-Feb-2009
[1471]
parse is ridiculously powerful (and equally hard to learn/use) :-)
Geomol
6-Feb-2009
[1472]
yes, paranthesis can hold any normal REBOL code (or actions as you 
call it).
kib2
6-Feb-2009
[1473]
Henrik: you mean things like python's "...".split(delimiter) ?
Henrik
6-Feb-2009
[1474]
yes
Geomol
6-Feb-2009
[1475]
kib2, if you're going to use parse, go read this: http://www.rebol.com/docs/core23/rebolcore-15.html
kib2
6-Feb-2009
[1476x2]
Geomol: nice, I've made a print version of a nice doc I've found 
here http://www.codeconscious.com/rebol/parse-tutorial.html, but 
I don't know if it's up to date.
Henrik: from what I've seen so far, such things are quiet easy with 
parse.
Geomol
6-Feb-2009
[1478]
That should be up to date too.
kib2
6-Feb-2009
[1479]
Geomol: ok, thanks. From what I'm reading, that's how Rebol builds 
all those dialects too.
Geomol
6-Feb-2009
[1480]
I think, parsing in REBOL is really strong. It makes us read about 
any kind of input without too much hazzle (once you've taken the 
time to get a feel for parse).
Henrik
6-Feb-2009
[1481x2]
yes, dialects can be processed with parse, however it's not the only 
method.
what makes parse truly powerful is multiple levels of dialects.
kib2
6-Feb-2009
[1483]
So Rebol does not really need regexps, that's it ?
Geomol
6-Feb-2009
[1484]
What was the definition of a dialect? Something that LOAD can handle?
Henrik
6-Feb-2009
[1485]
Geomol. yes I think so.
kib2
6-Feb-2009
[1486]
Parse seems to me like packrat parsers (pegs)
Henrik
6-Feb-2009
[1487]
I can read parse dialects. I can't read regexp. :-)
kib2
6-Feb-2009
[1488]
Henrik: well, I think that's their purpose : your code becomes very 
readable. But what about the perfs ?
Geomol
6-Feb-2009
[1489]
hehe :-)
kib2
6-Feb-2009
[1490]
Geomol: what do you mean ?! Poor or better than regexps ?
Geomol
6-Feb-2009
[1491]
kib, I think, you'll find performance of parse to be really good, 
and I think, the reason is, that parse is native.
kib2
6-Feb-2009
[1492]
Geomol: you mean parse is C implemented ?
Geomol
6-Feb-2009
[1493]
kib, I would say REBOL parse is a lot better than regexps. Yes, native 
words in REBOL is implemented in C.
Henrik
6-Feb-2009
[1494]
parse is surprisingly fast, yes.
kib2
6-Feb-2009
[1495]
Geomol: cool. And does parse uses Unicode with R3 now ?
Geomol
6-Feb-2009
[1496x2]
I think, Henrik is better to answer that.
R3 parse project: http://www.rebol.net/wiki/Parse_Project
It mention unicode.
Henrik
6-Feb-2009
[1498]
I think it will support unicode, yes.
kib2
6-Feb-2009
[1499]
That's very nice. Is parse inspired from something (another langage 
maybe ?).
shadwolf
6-Feb-2009
[1500]
no
Geomol
6-Feb-2009
[1501x2]
I have some rather large paring rules here:
http://www.fys.ku.dk/~niclasen/nicomdoc/nicomdoc.r
http://www.fys.ku.dk/~niclasen/nicomdoc/ndmath.r
and it's very fast to create a huge document from those rules.
*parsing*
kib2
6-Feb-2009
[1503]
shadwolf: thanks.
shadwolf
6-Feb-2009
[1504]
parse in the way it work is exclusive from rebol
kib2
6-Feb-2009
[1505]
Geomol: funny, I'm currently trying to port one of my Python project 
to Rebol : a markup langage with html/latex output !
shadwolf
6-Feb-2009
[1506]
ofcourse parsing a string with any language is a ground base (one 
of the 1st exercice of coding a studient will learn )
kib2
6-Feb-2009
[1507]
shadwolf: certainly, but it depends on what langage you're coding! 
Rebol seems a good candidate for such tasks. I'm also learning Factor, 
and I can tell you that it's a way harder (but maybe that's because 
it lacks some docs).
Geomol
6-Feb-2009
[1508x2]
kib, after I parse the input to RebXML format, I parse the RebXML 
to HTML with: http://www.fys.ku.dk/~niclasen/nicomdoc/ndrebxml2html.r

So 2 huge sets of rules (3 with math) is into play, and the final 
document is there in a matter of seconds.
kib, so I find parse to be very fast, and this real example is a 
good showcase, I think.
shadwolf
6-Feb-2009
[1510x3]
kib2 yes because rebol concept relies on 2 things in fact objects 
and dialect and as dialects are linked to parse system parse is the 
real thing that makes rebol a different language
I remember when i learn to analyse string data in C using string 
automaton algorythm ...  T___T
in rebol you can go from real ground to real abstractive concepts 
(from "a" to "<body" for example
kib2
6-Feb-2009
[1513]
Geomol: I think I'll try your tool before. Does it have any LaTeX 
backend ?
shadwolf
6-Feb-2009
[1514]
that means you can analyse each and every char in your document or 
locate flags and retrieve the data following
kib2
6-Feb-2009
[1515]
shadwolf: working with strings in C is a real headhache, I agree. 
but it's efficient. The more I know about Rebol, the more I like 
it.
shadwolf
6-Feb-2009
[1516]
parse works as a swich/case too since once a flag is found you can 
call external function to process the following datas
kib2
6-Feb-2009
[1517]
shadwolf: well, that's like Parsec in Haskell : you can associate 
"actions" within the parse.
Geomol
6-Feb-2009
[1518x2]
kib, the output in HTML include TeX for the math, which in the end 
is rendered by jsMath. No LaTeX, pure REBOL.
kib, main page is here: http://www.fys.ku.dk/~niclasen/nicomdoc/
kib2
6-Feb-2009
[1520]
Geomol: I've been misunderstood : I was asking if you can output 
a LaTeX doc from your markup engine.