• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp211
r3wp2311
total:2522

results window for this page: [start: 2101 end: 2200]

world-name: r3wp

Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public]
Gabriele:
30-Aug-2010
Kaj: well, it's not my module system, but it's basically the same 
thing as using SET 'WORD instead of WORD: , except that it is more 
readable (a newbie can guess what "export" means, while it's harder 
to guess that SET 'WORD is different from WORD:)


Florin: since R2 does not natively include the concept of "modules", 
all of us have been doing various things to avoid polluting the global 
context too much. I eventually got tired of all this and created 
this instead: http://www.rebol.it/power-mezz/mezz/module.html
Dockimbel:
3-Sep-2010
Thanks for the code, but the handshake implementation was trivial. 
My current issue is the fact that the new ws draft is breaking HTTP 
specifications by using a GET request with a message body...WTF?

I'm not the only one to find that odd: http://blog.iworks.at/?/archives/69-WebSockets-Handshake-non-HTTP-conforming.html
Davide:
4-Sep-2010
node.js is a v8 javascript interpreter that could be used server-side 
to make tcp server.

So, not only web server but server with persistent connection too, 
like web sockets.

Javascript on the server side isn't a new idea, but V8 is very fast 
and more light without the html dom complexity.
It's all event driven and seems very fun to play with it.
Graham:
7-Sep-2010
It says on hover, listening on port 8000 and cgi/rsp/html work
Graham:
7-Sep-2010
I click on the run as service and it changes to "Cheyenne is running" 
with no port now specifed.  Html/rsp and cgi all now fail.
Gabriele:
8-Sep-2010
http://www.rebol.it/power-mezz/mezz/logging.html
Dockimbel:
9-Sep-2010
My websocket chat demo now works again with Chrome 6: http://demo.cheyenne-server.org:8080/chat.html
Dockimbel:
5-Nov-2010
SVN r105

FEAT: debug mode can now be restricted to a given client IP address: 
debug/options [ip: 1.2.3.4]
FIX: debug menu now inserted only in pages with HTML content-type

FIX: (regression) debug menu and RSP errors now displayed even if 
response/buffer is empty

FIX: inlined colors for debug trace window (to avoid CSS overloading)

FIX: bad log filename generation when using a virtual host definition 
that includes a port-id
FIX: Cheyenne logo updated for default test pages
amacleod:
7-Jan-2011
my local script: 
<!DOCTYPE html>
<html>
<head>
  <style>img{ height: 100px; float: left; }</style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
	

<script>$.getJSON("http://localhost/jsontest.cgi”, function(data) 
{
      alert("JSON Data: " + data.foo);
});</script>
</body>
</html>

my rebol cgi script:
#!/cgi-bin/rebol.exe -cs %s %s
REBOL [Title: "json test"]
Print {
<html>
<head>
<title></title>

<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">

</head>
<body>
{
  "foo": "The quick brown fox jumps over the lazy dog.",
  "bar": "ABCDEFG",
  "baz": [52, 97]
}
</body>
</html>
}
Dockimbel:
7-Jan-2011
Amacleod: 

while [not understood?][read http://www.rebol.com/docs/core23/rebolcore-13.html#section-13]
amacleod:
7-Jan-2011
That worked. I get the alert but there is an error that  "data"  
(my variable) is undefined.


Can I use use the application/json header and if so what is the syntax...do 
I just replace the the "text/html" string?
Oldes:
7-Jan-2011
I guess you should print only the JSON data, not html page!
GrahamC:
5-Feb-2011
Longshot here .. but has anyone written a code formatter for RSP 
pages .. so that it correctly indents HTML, JS, and Rebol all on 
the same page??
MikeL:
18-Mar-2011
I am trying to use SAY to support EN, FR, and ES.  But only display 
one language.... possible due to wrong HTTPD.cfg.  I think I am following 
this  http://cheyenne-server.org/docs/rsp-api.html#def-33I 
put the  locales-dir %catalogs/ within the App because it was rejected 
in other httpd.cfg locations.   Can anyone SAY what I am doing wrong?
Dockimbel:
18-Mar-2011
How are you testing the language? Using locale/set-lang (http://cheyenne-server.org/docs/rsp-api.html#def-61) 
or by changing the language in your browser?
ChristianE:
18-Apr-2011
<html>
  2   <head>
  3     <title>Test</title>
  4   </head>
  5   <body>
  6     <p>
  7       <%= ajoin collect [repeat i 3 [keep i]] %>
  8     </p>
  9   </body>
 10 </html>
Dockimbel:
20-Apr-2011
No 404 here:
>> p: open/no-wait/direct tcp://localhost:80
>> insert p "DELETE /show.rsp HTTP/1.0^/^/"
>> probe copy p
{HTTP/1.1 200 OK
Server: Cheyenne/0.9.20
Date: Wed, 20 Apr 2011 11:06:16 GMT
Content-Length: 520
Content-Type: text/html
Connection: close
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: -1

<HTML>
<HEAD>
^-<TITLE>RSP Test Page</TITLE>
</HEAD>
...
onetom:
20-Apr-2011
onetom ~/rebol/delete $ cat httpd.cfg 
modules [ internal extapp static rsp alias ]
globals [ listen [8888]    bind RSP to [ .r ] ]
default [ debug root-dir %./ alias "/test" %test.r ]

onetom ~/rebol/delete $ cat test.r 
<% print request %>


onetom ~/rebol/delete $ rm chey-*.log; rebol -qws ~/rebol/cheyenne-server-read-only/Cheyenne/cheyenne.r 
-w 0 -vvv


onetom ~/rebol/delete $ curl -X DELETE -D- http://localhost:8888/test
HTTP/1.1 404 Not Found
Server: Cheyenne/0.9.20
Date: Wed, 20 Apr 2011 11:14:04 GMT
Content-Length: 53
Content-Type: text/html
Connection: close

<html><body><h1>404 Page not found</h1></body></html>


>> p: open/no-wait/direct tcp://localhost:8888
>>  insert p "DELETE /show.rsp HTTP/1.0^/^/"
>> probe copy p
{HTTP/1.1 404 Not Found
Server: Cheyenne/0.9.20
Date: Wed, 20 Apr 2011 11:17:34 GMT
Content-Length: 53
Content-Type: text/html
Connection: close

<html><body><h1>404 Page not found</h1></body></html>}



u were doing 1.0 DELETE request though, but it didn't make any difference.

onetom ~/rebol/cheyenne-server-read-only/Cheyenne $ svn up
U    mods/mod-action.r
Updated to revision 131.
Maxim:
22-Apr-2011
ok, so I promised a little announcement about work I have been doing 
in/with/for cheyenne...

I have built a web service module (mod) for cheyenne.
  -----------------------
  features/highlights
  -----------------------

   * extremely fine tuned to cause the least cpu hit on the server process 
   since ALL processing is done in worker processes.

   * it uses an arbitrary number of rebol script files which you assign 
   to any host in the config file. (even the default)

   * once assigned, these files are compiled dynamically (as one app) 
   by the mod and are exposed via http by the server.

   * only the functions you *chose* are *ever* visible on the web, allowing 
   you to include support libs, data and function right in your server-side 
   api.

   * no direct execution of code occurs, *ever* from the client to the 
   server, all input is marshaled, and parameters are typed to your 
   function specs.

   * allows ANY type of web api to be delivered, from REST to SOAP like 
   interfaces.

   * output is programmable, so that you can output AS  json, xml, html, 
   txt, etc.

   * interface is also programmable, so that you can provide GET params, 
   POST forms, POST (XML, JSON, REBOL native data)

   * Automatic API documentation via source scanning and function help 
   strings .  there will also be some form of comments which will be 
   used by documentation.

   * No suport for sessions. this is part of your application layer, 
   which should use https and session keys in the submitted data, if 
   you require it.

   * it takes litterally 5 minutes to convert your internal rebol code 
   into web services which obey internet standards.

   * System is auto-reconfiguring... i.e.  you don't need to close cheyenne 
   to update the service, just restart the workers.
Maxim:
22-Apr-2011
so, when will this be available?


*very soon*  I am building my first test release for my client tonight.


most of the research and prototyping is done, I already did some 
client demos for the people who are funding this project and I'm 
now in the "delivery" phase.


The most complicated parts of the system are already working (i.e. 
handler processes, dynamic compilation, automatic api interface building, 
per-host api/config, request/response chain of command, multi-format 
output, and more.)

a lot of details are still "up in the air" as far as implementation 
goes, so if you really have a need for this, PLEASE STAND UP and 
raise your voice.  tell me what you need, how you want it to work, 
etc.

so far I plan to deliver the first release with: 

  support 4 interfaces for calling : GET url, POST XML, POST Form data, 
  POST JSON.

  support 4 output formats : XML, HTML, JSON, TXT (which is in fact 
  rebol native data)


obviously this will be an ongoing project and anyone who is interested 
in helping out is welcomed to do so.  :-)
onetom:
2-May-2011
im writing a json webservice and actually it's very annoying when 
i get a RSP error html page, instead of the usual rebol error.
Dockimbel:
2-May-2011
im writing a json webservice and actually it's very annoying when 
i get a RSP error html page, instead of the usual rebol error.
 


debug/off should fix that: http://cheyenne-server.org/docs/rsp-api.html#def-65
onetom:
6-May-2011
ok, probably im trying to do something forbidden there


6/5-17:27:41.971934-[Logger] New request: T6/5-17:27:41.948903-## 
Error in [task-handler-55484] : Make object! [
    code: 312
    type: 'script
    id: 'cannot-use
    arg1: 'path
    arg2: 'none!
    arg3: none
    near: [switch debug-banner/opts/error [
            inline [html-form-error err file] 
            popup [debug-banner/rsp-error: make err [src: file]]
        ]]
    where: 'protected-exec
] !
onetom:
8-May-2011
the html error page says: Redirection Trapped
onetom:
8-May-2011
any example how do u test pages behind a session?

im trying curl -D- -d 'login=test&pass=letmein' -c jar http://localhost:8080/app/login.rsp

but subsequent curl -D- -c jar http://localhost:8080/app/some.html 
still gives me 302 to login.rsp
onetom:
8-May-2011
$ cat jar
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.


#HttpOnly_guan-huat     FALSE   /       FALSE   0       RSPSID  MTXVGMVOMYMVGDZKFURKPQKK
onetom:
8-May-2011
curl -D- -d 'login=test&pass=letmein' -c jar http://localhost:8080/login.rsp
curl -D- -b jar -c jar http://localhost:8080/some.html
worked, btw
Kaj:
14-May-2011
Graham, do you mean a WYSIWYG HTML editor?
Kaj:
14-May-2011
I collected links to several HTML editor widgets, but I don't know 
how they would do auto-saving
GrahamC:
14-May-2011
This is a small editor with ajax support .. but probably no autosave 
http://remiya.com/htmlbox/index.php/12/demo/ajax-demo.html
GrahamC:
14-May-2011
but html ...
PeterWood:
30-May-2011
onetom: I think there is any easy way to implement nginx to give 
you what you want without interfering with your current Cheyenne 
setup. It is to use nginx on another port (say 8000) to serve all 
your .js files. I've found nginx easy to install and configure. The 
only change you'd need to make to your system is to update the urls 
of the javascript files in your html with the port number.
amacleod:
17-Oct-2011
<?php
$contact = array("name" => "Ben");
$contact_encoded = json_encode($contact);
header('Content-type: text/html');
echo $_GET['callback'] . "(" . $contact_encoded . ")";
?>
Janko:
19-Nov-2011
Just one question, nothing urgent. Would it be possible or smart 
if cheyenne would return http 401 to ajax request when the session 
times out? Now it basically return 200 and login form html (so I 
have to test for presence of </form>) instead of usuall JSON.
Janko:
19-Nov-2011
or like you check now it here is any html returned in debug more, 
if not you don't render the debug bar
Dockimbel:
19-Nov-2011
Cheyenne doesn't return HTML when a session times out, it only returns 
a 301 (or 302, I don't remember) to the URL you've specified in the 
config file after AUTH.
Janko:
19-Nov-2011
yes, I agree it's not so straightforward .. you could only redirect 
when there is accept: "*html*" ..
Janko:
19-Nov-2011
hm.. same would be then for error, again when in JSON mode .. instead 
of html explanation you should return 500
Dockimbel:
24-Nov-2011
Bad news for websocket support in REBOL: the new RFC requires that 
client encodes data sent to server using a basic XOR encryption algorithm:


http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#section-4.3


This is a bad news for us, because it requires to process all bytes 
received, one by one to decode the message. REBOL is very slow at 
processing big data in loops, so the overhead can be very significant 
for data frames of a few dozen KB and more. It could affect Cheyenne 
global performances drastically.


However, it could have been worse, this encryption scheme is not 
required for data sent by server. So, as long as clients are sending 
small messages (up to a few KB), the overhead should be low. Fortunately, 
the usual client messages are queries to obtain data, so usually 
small. But if you have to move big amouts of data (like XML documents) 
back and forth through websockets, Cheyenne won't be able to cop 
with the load and it will most probably be a show-stopper.
Dockimbel:
28-Nov-2011
Websocket support updated to hybi-10 revision. Websocket chat demo 
also upgraded: http://demo.cheyenne-server.org:8080/chat.html
Endo:
29-Nov-2011
Oh but there a "testapp" in embed-demo.r? and its not plain HTML.
Endo:
9-Dec-2011
Is it UTF-8 in your chat example? Cheyenne converts text to UTF-8?
Text mode is ok to me.


By the way, I tested ws.html in Cheyenne sources on my XP/Home yesterday 
with Chrome, it closes the connection immediately.
But it works here now, on XP/Pro with Chrome.
Dockimbel:
9-Dec-2011
ws.html: same Chrome version on both machines?
Endo:
9-Dec-2011
One last thing: in ws.html there is a button to close the connection:

<button onClick=" alert('button closed');conn.close();"> Disconnect 
</button>


But I never get onClose event and don't see a connection close on 
server logs:
conn.onclose = function(evt) { alert("Conn closed"); }

And "tick"s appear even if I click on Disconnect.
Endo:
9-Dec-2011
I tested ws.html in Cheyenne sources on my XP/Home yesterday with 
Chrome, it closes the connection immediately. But it works here now, 
on XP/Pro with Chrome.

I just tested on XP/Home it works well. I think it was not the latest 
version I've tested yesterday.
Endo:
9-Dec-2011
When I remove AUTH line from WEBAPP section in httpd.cfg file, the 
browser always returns :ERR_EMPTY_RESPONSE error.
Here is my part of httpd.cfg
	webapp [
		virtual-root "/testapp"
		root-dir %www/testapp/
;		auth "/testapp/login.rsp"
		;debug
	]


in %testapp/  I have test.html and test.rsp they both very simple 
files, I have app-init.r also. But I can never access those files.
In Cheyenne log file I see following error:


10/12-3:11:39.3120-## Error in [uniserve] : On-received call failed 
with error: make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'second
    arg2: 'series

    arg3: [series! pair! event! money! date! object! port! time! tuple! 
    any-function! struct! event!]
    near: [either url: second pos: find]
    where: 'process-webapp
] !


As a work around I put auth line to a rsp file that just do session/content/login?: 
yes and redirect. 
Do you have any idea? I tested with 0920 and r164.
Oldes:
21-Dec-2011
Browsers like Chrome or Firefox are fine if find a BOM inside html, 
but for example IE6 had a problem - at least in my case. So far I 
just resaved my source, but I can imagine that it will reappear in 
a future again (as UTF8 with BOM is default).
Group: gfx math ... Graphics or geometry related math discussion [web-public]
Oldes:
25-Oct-2010
or: http://www.csc.liv.ac.uk/~epa/surveyhtml.html
Group: !CureCode ... web-based bugtracking tool [web-public]
Dockimbel:
29-Mar-2010
Btw, HTML tags are allowed in comments. ;-)
Kaj:
12-Dec-2010
It encodes it as a special HTML entity, but double so that it is 
not shown as the original character
Oldes:
13-Dec-2010
It's for sure CC bug as it converts the HTML entity into bug link.
Dockimbel:
13-Dec-2010
Upgrade done. Changes:

o FEAT: Short URLs for tickets direct referencing added.

o FIX: double escaping of HTML entities in description and comments 
removed.

o FIX: vertical spacing of RSS image when navigation buttons are 
not present.
Group: Profiling ... Rebol code optimisation and algorithm comparisons. [web-public]
Maxim:
30-Oct-2009
in any case I want to build a single script which does all the tests, 
statistics, and eventually graphics and html pages of all results 
in one (VERY) long process.

so I can better control how the tests are done and prevent automated 
test creation as I am doing now.
Group: Bounties offered ... Bounties on offer [Announce only] [web-public]
TomBon:
18-Feb-2011
offered by:
	TomBon
Task:
	R3 - Bindings for FANN - Fast Artificial Neural Network Library
	http://leenissen.dk/fann/wp/

	API  -> http://leenissen.dk/fann/html/files/fann-h.html

Amount:
	$350
Valid until:
	01.04.2011
Terms:
	PayPal
TomBon:
18-Feb-2011
offered by:
	TomBon
Task:

 R3 - Bindings for a KNNL - SOM (Self-organizing map) /Kohonen Network
	http://knnl.sourceforge.net/

	API - http://knnl.sourceforge.net/html/index.html

	Further Readings:
	http://en.wikipedia.org/wiki/Self-organizing_map
	http://www.ifs.tuwien.ac.at/dm/somtoolbox/
	http://accu.org/index.php/journals/1378
	http://www.codeproject.com/KB/graphics/som.aspx

	Alternativ:
	Quick Tutorial on how to construct a SOM.
	Perhaps to create a modul directly in R3?
	http://www.ai-junkie.com/ann/som/som1.html


Amount:
	$350
Valid until:
	01.04.2011
Terms:
	PayPal
TomBon:
18-Feb-2011
offered by:
	TomBon
Task:

 converting code to native R2/R3  code for three basic AI components.
	
	Genetic Algorithms in Plain English
	http://www.ai-junkie.com/ga/intro/gat1.html
 
	Kohonen's Self Organizing Feature Maps
	http://www.ai-junkie.com/ann/som/som1.html

	Neural Networks
	http://www.ai-junkie.com/ann/evolved/nnt1.html

Amount:
	$500
Valid until:
	01.04.2011
Terms:
	PayPal
Group: !REBOL3 Schemes ... Implementors guide [web-public]
Graham:
5-Jan-2010
How do you get the source to the http protocol as documented here 
http://www.rebol.net/docs/prot-http.html
Graham:
6-Jan-2010
HEAD / HTTP/1.0
Accept: */*
Accept-Charset: utf-8
Host: www.rebol.com
User-Agent: REBOL

HTTP/1.1 200 OK
Date: Wed, 06 Jan 2010 07:28:08 GMT

Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 
mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 
OpenSSL/0.9.7a
Last-Modified: Fri, 01 Jan 2010 21:19:01 GMT
ETag: "3f44376-2667-4b3e66c5"
Accept-Ranges: bytes
Content-Type: text/html
Via: 1.1 bc1
Content-Length: 9831
Connection: close
Gabriele:
6-Jan-2010
make-http-request is called from the read or write operations. eg. 
write [head %index.html] will make a HEAD request etc.
Gabriele:
8-Jan-2010
Brian: ok... let's make it easy... i just copied it here: http://www.rebol.it/giesse/wetan-test.r
and http://www.rebol.it/giesse/wetan-template.html- they just need 
to be in the same dir.
Graham:
10-Jan-2010
reverse lookups http://cr.yp.to/djbdns/intro-dns.html
Graham:
28-Jan-2010
Maybe what should happen instead is that if you receive other than 
xml, text, then the data should be streamed a file and a file! returned 
instead ( like Cheyenne does with html uploads ) ...
DideC:
26-May-2010
REBOL []

print "Serving port 8080..."

open-subport: func [port] [
    print "=== Creating sub-port"
    port/awake: func [event /local port] [
        print ["=== Subport event:" event/type]
        port: event/port
        switch/default event/type [
            read [
                print ["    " data: to-string port/data]

                write port to-binary rejoin ["<html><head></head><body>" data "</body></html>" 
                newline]
                true
            ]
            wrote [read port]
            close [close port]
        ] [false]
    ]
]

server: open tcp://:8080

server/awake: func [event] [
    print ["*** Server event:" event/type]
    if event/type = 'accept [
        open-subport first event/port
    ]
    false
]

wait 30
close server
print "Done serving"
halt
DideC:
26-May-2010
REBOL []

print "Serving port 8080..."

open-subport: func [port] [
	print "=== Creating sub-port"
	port/awake: func [event /local port data] [
		print ["=== Subport event:" event/type]
		port: event/port
		switch/default event/type [
			read [
				print ["    " data: to-string port/data]
				data: replace/all data newline <br>

    write port to-binary rejoin ["HTTP/1.0 200 OK^/Content-type: text/html^/^/<html><head></head><body>" 
    data "</body></html>" newline]
			]
			wrote [
				close port
			]
		] [false]
	]
	
	read port
]

server: open tcp://:8080

server/awake: func [event] [
    print ["*** Server event:" event/type]
    if event/type = 'accept [
        open-subport first event/port
    ]
    false
]

wait 30
close server
print "Done serving"
halt
GrahamC:
4-Mar-2011
I am wondering how one would implement the IMAP4 IDLE command .. 
see http://tools.ietf.org/html/rfc2177


It seems that once one sends an IDLE command, the server might then 
send a response back any time up to the server's inactivity timeout.
Group: !REBOL3 ... [web-public]
Ashley:
30-Jan-2010
Are modules working correctly?

>> system/version
== 2.100.96.2.5
>> import http://www.rebol.it/power-mezz/mezz/form-error.r
>> source form-error
form-error undefined


Also, are the Imports and Globals fields (as used in Gab's Power 
Mezz) supported? ... http://www.rebol.com/r3/docs/concepts/modules-defining.html#section-3
Claude:
10-Feb-2010
in doc R3 => http://www.rebol.com/r3/docs/concepts/modules-loading.html
Ashley:
19-Feb-2010
A little something I put together to help R3 developers: http://www.dobeash.com/REBOL/r3-ref.html
Paul:
20-Feb-2010
Just a small script:

#!/home/paulsite/dist/r3 -c
REBOL []
print [<HTML><BODY> now </BODY></HTML>]
print ""
Pekr:
13-Apr-2010
Nice achievement in regards to R3 :-) Btw - it seems Carl is working 
on turning View into Extension - http://www.rebol.com/r3/docs/view/graphics-ext.html
Pekr:
13-Apr-2010
Delayed Extensions - http://www.rebol.com/r3/notes/delayed-mods.html
AdrianS:
21-Apr-2010
Brian - I seem to recall that the JVM as a target paltform for REBOL 
was discounted (because of performance and not having tail-call optimization, 
I think) - have you any opinion on targetting the Microsoft DLR? 
This would be a good way to get traction by being able to run in 
browsers (not just IE) without a REBOL plugin (well, assuming that 
Silverlight was already installed).

Some browser samples in Ruby and Python:

http://www.visitmix.com/labs/gestalt/samples/

This page walks thrugh running Ruby in the browser:


http://www.rubyinside.com/ironruby-silverlight-ruby-in-browser-3192.html
Pekr:
27-Apr-2010
I wonder how the 'self discussion resolves. Brian - Carl just pointed, 
that the description to #1549 ticket is not clear to him .... there 
is also new Doc page to it - http://www.rebol.com/r3/docs/concepts/objects-self.html
Pekr:
4-May-2010
what's 'filter-error? It's undefined in R3 .... http://www.rebol.com/r3/docs/errors/internal-bad-path.html
Group: Power Mezz ... Discussions of the Power Mezz [web-public]
Will:
27-Jan-2010
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
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...
Gabriele:
27-Jan-2010
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
Gabriele:
27-Jan-2010
(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...)
Graham:
30-Jan-2010
>> 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..
Gabriele:
31-Jan-2010
Since filter-html is defined globally, you can also use: load-module 
%mezz/filter-html.r
Gabriele:
23-Sep-2010
http://www.rebol.it/power-mezz/mezz/text-encoding.html

See the list of supported encodings.
florin:
25-Sep-2010
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
http://www.rebol.it/power-mezz/mezz/module.html
BrianH:
26-Sep-2010
Gabriele likes what is called "literate programing". RLP is his own 
processor that implements it. The .rpl files are the source of both 
the .r code files and the .html doc files, one .rlp generates both. 
If you want to understand his code, either read the .html or the 
.rlp file; the .r file is not formatted for human consumption.
Gabriele:
27-Sep-2010
Florin, if you go here: http://sourceforge.net/projects/rebol-power-mez/files/


you'll find power-mezz-built-1.0.0.zip which contains pre-built .r 
scripts. Inside tools/ , there is a module-console.r which defines 
a IMPORT function so that you can just write "import %mezz/load-html.r" 
and have its exported words available in the console.

Otherwise, from your own code:

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

    module [
        Imports: [%mezz/load-html.r]
    ] [
        ; your code that uses load-html
    ]
Gabriele:
27-Sep-2010
of note, if you have the normal package, from windows you can go 
to tools/ and double click on wetan-test.r (assuming you have View 
associated with .r files), and it will just ask you for a file to 
process. select any of the .rlp file to process it and produce .html 
and .r files.


make is only required if you want everything to happen automatically. 
i'm not sure if it is obscure, as it is the tool used by basically 
every C programmer on this planet since 1980 or so...
florin:
27-Sep-2010
Is it not enough to pass an html (string!) to load-html ?
Gabriele:
28-Sep-2010
yes, html string should be enough.

Script: {Allows "importing" modules at the console} (none)
Script: "Modules for REBOL 2" (none)
>> import %mezz/load-html.r

>> result: load-html "<p>This is a paragraph<p>This is another one"

== [root none [] [html [...] [] [head [...] [] [title [...] []]] 
[body [...] [] [p [...] [] [text [...] [value "This is a paragraph...
Gabriele:
28-Sep-2010
>> import %mezz/trees.r
>> print mold-tree result

[root [] [html [] [head [] [title []]] [body [] [p [] [text [value 
"This is a paragraph"]]] [p [] [text [value "This is another one"]]]]]]
florin:
1-Oct-2010
In the following segment:


p [...] [id "myId" class "pclass"] [text [...] [value "Some text 
in the paragraph"]]

what does [...] represent?

Except "root" every html element is followed by this [...].
Gabriele:
3-Oct-2010
you can navigate with GET-NODE, I haven't needed something like XSLT 
Paths yet (I had something closer to that in Temple).

root: load-html ...
p: get-node root/childs/html/childs/body/childs/p ; for eg.


most of the logic to do what you want is already in trees.r actually, 
because of the rewrite-tree function (that I don't use anymore). 
Anyway, a simple way would be:

get-node-with-id: func [root id] [
    if id = get-node root/prop/id [return root]
    foreach child get-node root/childs [
        if get-node-with-id child id [return child]
    ]
    none
]
PatrickP61:
15-Dec-2010
Hi Gabriele,


I'm trying out your power-mezz for the first time.  Do you have any 
other documentation on how to set it up properly?
Here is what I'm doing:


power-mezz-path:	to-path e:/Projects/PT/Rebol/power-mezz-built-1.0.0/
print "Starting mezz/module.r"
do power-module:	to-url ajoin [power-mezz-path 'mezz/module.r]
print	"Returned mezz/module.r"
load-module/from power-mezz-path
module [
	imports: [%mezz/html-to-text.r]
	]
--> e:/Projects/PT/Rebol/power-mezz-built-1.0.0/
--> Starting mezz/module.r

** Access Error: Invalid port spec: e:/Projects/PT/Rebol/power-mezz-built-1.0.0/mezz/module.r

** Near: do power-module: to-url ajoin [power-mezz-path 'mezz/module.r]

Any ideas on what I did wrong?
PatrickP61:
18-Dec-2010
The particular script I am writing is called GET ADDRESS.  This script 
takes a CSV file called contacts which has first and last name, city 
and state of all of my friends that I'd like to get addresses for 
Christmas cards, but have forgotten or misplaced.


So far, the script takes each entry and sends it to SUPERPAGES.com 
where the HTML sent back contains the information.  Right now, I'm 
simply saving the HTML as a file for each entry in my CSV.


What I would like to do is somehow parse the HTML from it and extract 
out the address lines, zip code, phone number etc.  But I admit that 
parsing through HTML is daunting to me.  So after looking around 
on the internet, I discovered HTML-TO-TEXT in your Power Mezz.  


That is where I am now, trying to figure it out and see how it works. 
 I've read some of your documentation, but I admit, I am still in 
the dark as to how it works -- at least for my application.  Any 
advice you have is welcome.

Thanks in advance.
Kaj:
18-Dec-2010
Use "5.10 Parse HTML text into a tree" instead
Oldes:
19-Dec-2010
To be honest, if you just like to parse some HTML page to get some 
parts of it, you don't need to use Power Mezz at all.. I'm using 
Rebol more than 10 years and still consider PM as a too complex staff 
for me. If you are REBOL newbie, better to start reading REBOL doc. 
In your case something about parsing.
Oldes:
19-Dec-2010
There is a lot of pages about 'parse' on net... for example this 
one: http://www.rebol.com/docs/core23/rebolcore-15.html
Kaj:
19-Dec-2010
But when the HTML and the data become more complex, there are so 
many exceptions you have to program, that a real HTML parser becomes 
more convenient
Henrik:
19-Dec-2010
would a real HTML parser convert the data to a REBOL object?
Henrik:
19-Dec-2010
a good one would be to convert R3 rich text to HTML and vice versa.
Anton:
20-Dec-2010
Kaj, I think it's the other way around! I found when the HTML and 
the data become more complex, then a simpler "hack" parse job is 
more likely to survive changes to the source. This happened to me 
several times with a weather forecast and television guide scraper 
etc. that I made (and remade, and remade..).
2101 / 252212345...2021[22] 23242526