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

World: r3wp

[Power Mezz] Discussions of the Power Mezz

Sunanda
27-Jan-2010
[1]
For discussions of Ganriele's Power Mezz:
   http://www.rebol.it/power-mezz/
Gabriele
27-Jan-2010
[2]
Thanks!
Henrik
27-Jan-2010
[3]
Is it a product? If so, there should be a ! before the group name.
Gabriele
27-Jan-2010
[4x2]
The SF page is on http://sourceforge.net/projects/rebol-power-mez/
I wouldn't consider it a "product". it is a collection of modules.
Pekr
27-Jan-2010
[6]
We could as well use the group power-pack, although it was meant 
a bit differently - to create package of most usefull add-on stuff, 
so e.g. mysql protocol, rugby, uniserve, etc.
Sunanda
27-Jan-2010
[7]
Sorry -- mistyped your name, Gabriele!
Gabriele
27-Jan-2010
[8]
of note, you don't see that from the website, but the repository 
includes a test suite and benchmark suite as well. they are undocumented... 
but i guess they can be useful for other projects as well...
Pekr
27-Jan-2010
[9x2]
I use another nice stuff from Gabriele in there :-) I do remember, 
that some nice libs were created even for the Detective. But maybe 
Gabriele wants to keep Qtask related stuff separated?
IIRC, there was nice auto-update library for e.g., async call, or 
something like that ...
Gabriele
27-Jan-2010
[11]
if i had the time, i would add everything to the power mezz. the 
detective stuff needs some work though before being added here. (convert 
to a module, change the format, add tests if possible, and so on)
Ashley
27-Jan-2010
[12]
Thankyou for that, I can particularly relate to "reduce the need 
of reinventing the wheel for each developer"! Documentation is first 
rate as well (both presentation and content). Congrats to all involved.
Will
27-Jan-2010
[13x3]
Grazie Gabriele, Thank you Reichart ! 8-)
links for "6.1 Macros for handling trees" are 404
I would suggest adding a charset in the header of source code pages, 
this one for example http://www.rebol.it/power-mezz/mezz/html-to-text.r
I get this line:

break-at: complement charset [#"0" - #"9" #"A" - #"Z" #"a" - #"z" 
{"'#$%&([^{@} #"" - #""]   <- last 2 chars are ?
Gabriele
27-Jan-2010
[16x7]
Will: I tend to have strings as UTF-8, but char! values need to be 
latin1 for R2. The .r files are the result of MOLD so although I 
have #"^(XX)" in the RLP source, you get the actual latin1 char in 
the .r.
Wetan does not properly handle this case either so the HTML sometimes 
does not display char! values correctly. I need to set aside some 
time to work on Wetan...
If you look here: http://rebol-power-mez.hg.sourceforge.net/hgweb/rebol-power-mez/rebol-power-mez/file/68b9806fc1a1/mezz/html-to-text.rlp
you'll find: break-at: complement charset [#"0" - #"9" #"A" - #"Z" 
#"a" - #"z" {"'#$%&([^{@} #"^(80)" - #"^(FF)"]
(HTML to Text needs to be rewritten as it's still using the old normalize-html 
function. load-html is much faster and much better...)
fixed the missing macros dir
uploaded (to sourceforge) a zip with just the modules (.r files). 
no tests, docs, etc. for the lazy :-)
BrianH
27-Jan-2010
[23]
I'll be sure to test against future R2 versions for compatibility. 
The only gotcha so far is COLLECT, but that's not bad.
Gabriele
28-Jan-2010
[24]
it should not clash with any built in ones available in the future, 
because it's a module.
BrianH
28-Jan-2010
[25]
For that matter it works (sort-of) the same, so it's a swap-in replacement. 
Hence the "not bad" :)
BrianH
30-Jan-2010
[26]
Here's the group about Gabriele's Power Mezz package.
Graham
30-Jan-2010
[27]
>> do %mezz/filter-html.r
Script: "HTML Filter" (none)
** Script Error: macro has no value

** Near: !set-assoc: macro [assoc word value] [(:either) _pos: (:find) 
assoc word [(:poke) _pos 2 value/only] [
        insert/on..
BrianH
30-Jan-2010
[28x4]
Did you use LOAD-MODULE to import the module? IIRC that is the function 
name that Gabriele used.
Most of the Power Mezz files are modules written for the Power Mezz 
module system.
Strangely enough, the R2/Forward source is already in Power Mezz 
module form :)
(Just one though, for now)
Gabriele
31-Jan-2010
[32x5]
Graham, I'll answer here.
1) Download the built zip, or download the scripts individually from 
http://www.rebol.it/power-mezz/. (Of course it would be nice to 
get the whole repo and setup your system to be able to make changes 
as well. It currently requires GNU Make, however, those crazy people 
still using Windows could rewrite remake.r to do all the work.)
2) In your script, use something like:

do %/path/to/module.r
load-module/from %/path/to/power-mezz/

module [
    Imports: [%mezz/filter-html.r]
] [
    ; ....
]
Since filter-html is defined globally, you can also use: load-module 
%mezz/filter-html.r
however, I recommend the former as I don't like making things global 
and I will remove that eventually
Graham
31-Jan-2010
[37]
Thanks ... I'll give it a go.  But it seems that it would require 
a bit of work to use this within an encapped script?
Gabriele
1-Feb-2010
[38]
yes, though it would be easy to add support to prebol.
Janko
22-Sep-2010
[39x2]
First of all.. thanks for making this and making it awailable. I 
am working with emails now for usrjoy and if I would have to manaually 
detect and decode (or write all this) various encodings in subject 
or content I would just shoot myself (like quoted printable / base64 
).
I can use decode-email-field to decode various encodings of subject. 
But I wasn't able to figure out how can I decode the content of an 
email which is in my case encoded with quoted-printable / utf8 . 


I found to-netmsg library on codeconscius.com code that loads the 
email text and parses it into structure. It doesn't decode the subject 
=?UTF-8?B...?= but it does the content. I could use that and power 
mezz to get the effect I want. If there is a way to encode content 
in power-mezz I would rather use it alone.
Gabriele
23-Sep-2010
[41]
http://www.rebol.it/power-mezz/mezz/text-encoding.html

See the list of supported encodings.
florin
25-Sep-2010
[42]
Is there any documentation on how to use these modules? I've had 
a couple of hours this beautiful weekend and all I did was try to 
find a way to load load-html.r with no results. Dependent modules 
change the current directory in the console and as a result one module 
cannot find another another. Yes, I am a poor soul on windows. Heck, 
I got to take the kids to the Fall Festival and am late already.
BrianH
25-Sep-2010
[43]
http://www.rebol.it/power-mezz/mezz/module.html
florin
25-Sep-2010
[44]
So this: %./ wasted 2 hours of my precious Saturday! I hate dots 
and slashes.
Graham
25-Sep-2010
[45x2]
only 2 hours?  lol
I think Gab built them into one package .. check http://sourceforge.net/projects/rebol-power-mez/
florin
25-Sep-2010
[47x3]
Well, well. I thought I could just type and things heppen. I actually 
need to read code. Bummer. This guy, BrianH, is a heartless man.
The package you mention has files with a different extension, .rlp. 
Apparently the package needs to be  cooked on a strange OS different 
than Windows. (Gabriele: It currently requires GNU Make, however, 
those crazy people  still using Windows could rewrite remake.r to 
do all the work).
Keeping things obscure is part of the nefarious goals of the Genius 
Network United (GNU).
Andreas
26-Sep-2010
[50]
http://gnuwin32.sourceforge.net/downlinks/make-bin-zip.php

has a single binary in the bin/ subfolder, "make.exe", that's all 
you need.