• 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
r4wp178
r3wp2151
total:2329

results window for this page: [start: 201 end: 300]

world-name: r3wp

Group: !AltME ... Discussion about AltME [web-public]
Maxim:
14-Mar-2005
it loads, but gives me a script load error, as if it was not able 
to decrypt the code within...
Izkata:
7-Apr-2005
This seems to be something to fix/change - AltME couldn't connect 
a few minutes ago, and IE wouldn't load any websites - I ran Ad-Aware 
and removed 17 tracking cookies.  As soon as they were gone, IE worked 
-and- AltME connected..

Is Rebol or AltME dependant on Internet Explorer?
Group: Core ... Discuss core issues [web-public]
shadwolf:
31-Dec-2004
hello every body On rebolfrance Forum we have a guy who wants to 
load a library DLL he have done most part of the work but he can't 
find how to convert in his rebol cloned struct! the int intpointer[4] 
from C language to an equivalent type of rebol. Can you enlight us 
please (you can respond directly to shadwolf)
Pekr:
10-Jan-2005
I just wanted to load small text files (representing records) into 
block, then sort them. But as life goes on, your system evolves and 
I can imagine, that your e.g. Contact database will be extended by 
e.g. cell-phone2 record. But your previous records are already synced 
across tens of users. I wanted to sort and wondered, what to do about 
old records ...
shadwolf:
13-Jan-2005
the thing is how to load or convert a C structure like this and use 
it in REBOL in a approachant way of C (I hope we could find even 
a better way to do it with rebol than in C)
shadwolf:
13-Jan-2005
//-------------------------------------------------------------
//- SMD2Header
//- Header for all Md2 files, 
struct SMD2Header
{
   int m_iMagicNum; //Always IDP2 (844121161)
   int m_iVersion;  //8
   int m_iSkinWidthPx;  
   int m_iSkinHeightPx; 
   int m_iFrameSize; 
   int m_iNumSkins; 
   int m_iNumVertices; 
   int m_iNumTexCoords; 
   int m_iNumTriangles; 
   int m_iNumGLCommands; 
   int m_iNumFrames; 
   int m_iOffsetSkins; 
   int m_iOffsetTexCoords; 
   int m_iOffsetTriangles; 
   int m_iOffsetFrames; 
   int m_iOffsetGlCommands; 
   int m_iFileSize; 
};

//-------------------------------------------------------------
//- SMD2Vert
//- Vertex structure for MD2
struct SMD2Vert
{
float m_fVert[3];
unsigned char m_ucReserved;
};


//-------------------------------------------------------------
//- SMD2Frame
//- Frame information for the model file 
struct SMD2Frame
{
float m_fScale[3];
float m_fTrans[3];
char m_caName[16];
SMD2Vert * m_pVerts;

//Cleans up after itself
SMD2Frame()
{
m_pVerts = 0;
}

~SMD2Frame()
{
if(m_pVerts)
delete [] m_pVerts;
}
};

//-------------------------------------------------------------
//- SMD2Tri
//- Triangle information for the MD2
struct SMD2Tri
{
unsigned short m_sVertIndices[3];
unsigned short m_sTexIndices[3];
};

//-------------------------------------------------------------
//- SMD2TexCoord
//- Texture coord information for the MD2
struct SMD2TexCoord
{
float m_fTex[2];
};

//-------------------------------------------------------------
//- SMD2Skin
//- Name of a single skin in the md2 file
struct SMD2Skin
{
char m_caSkin[64];//filename
CImage m_Image;//Image file ready for texturing
};

//-------------------------------------------------------------
//                        CTIMER                              -
// author: Evan Pipho ([evan-:-codershq-:-com])                     -
// date  : Jul 10, 2002                                       -
//-------------------------------------------------------------
class CMd2 : public CModel
{
public:

//Set skin to one of the files specified in the md2 files itself
void SetSkin(unsigned int uiSkin);
//Set skin to a different image
void SetSkin(CImage& skin);

//Load the file
bool Load(const char * szFilename);

//Render file at the initial position
void Render();
//Render the file at a certain frame
void Render(unsigned int uiFrame);


//Animate the md2 model (start and end frames of 0 and 0 will loop 
through the WHOLE model

void Animate(float fSpeed = 30.0f, unsigned int uiStartFrame = 0, 
unsigned int uiEndFrame = 0, bool bLoop = true);

//constructors/destructo
CMd2();
CMd2(const char * szFile);
~CMd2();

private:

CTimer m_Timer;
//file header information
SMD2Header m_Head; 
//Frame information
SMD2Frame * m_pFrames;
//Triangles
SMD2Tri * m_pTriangles;
//Texure coords
SMD2TexCoord * m_pTexCoords;
//Skin files
SMD2Skin * m_pSkins;
//Interpolated vertices
SMD2Vert * m_pVerts;
//Current skin
unsigned int m_uiSkin;
//Using a custom skin?
bool m_bIsCustomSkin;
//The custom skin
CImage * m_pCustSkin;

};
shadwolf:
14-Jan-2005
the goal is to provide to REBOL the capability to do such a load 
in the simpliest and fastest way I think the posibility of using 
a vectorial data like float myvar[3];
shadwolf:
14-Jan-2005
//-------------------------------------------------------------
//- Load
//- Loads an MD2 model from file
//-------------------------------------------------------------
bool CMd2::Load(const char * szFilename)
{
	unsigned char * ucpBuffer = 0;
	unsigned char * ucpPtr = 0;
	unsigned char * ucpTmpPtr = 0; 
	int iFileSize = 0;
	FILE * f;
	
	if(!(f = fopen(szFilename, "rb")))
	{
		APP->Log(COLOR_RED, "Could not open MD2 file %s", szFilename);
		return false;
	}

	//check file size and read it all into the buffer
	int iStart = ftell(f);
	fseek(f, 0, SEEK_END);
	int iEnd = ftell(f);
	fseek(f, 0, SEEK_SET);
	iFileSize = iEnd - iStart;

	//Allocate memory for whole file
	ucpBuffer = new unsigned char[iFileSize];
	ucpPtr = ucpBuffer;

	if(!ucpBuffer)
	{

  APP->Log(COLOR_RED, "Could not allocate memory for %s", szFilename);
		return false;
	}

	//Load file into buffer
	if(fread(ucpBuffer, 1, iFileSize, f) != (unsigned)iFileSize)
	{
		APP->Log(COLOR_RED, "Could not read from %s", szFilename);
		delete [] ucpBuffer;
		return false;
	}

	//close the file, we don't need it anymore
	fclose(f);

	//get the header
	memcpy(&m_Head, ucpPtr, sizeof(SMD2Header));

	//make sure it is a valid MD2 file before we get going
	if(m_Head.m_iMagicNum != 844121161 || m_Head.m_iVersion != 8)
	{
		APP->Log(COLOR_RED, "%s is not a valid MD2 file", szFilename);
		delete [] ucpBuffer;
		return false;
	}
	
	ucpTmpPtr = ucpPtr;
	ucpTmpPtr += m_Head.m_iOffsetFrames;

	//read the frames
	m_pFrames = new SMD2Frame[m_Head.m_iNumFrames];
	
	for(int i = 0; i < m_Head.m_iNumFrames; i++)
	{
		float fScale[3];
		float fTrans[3];
		m_pFrames[i].m_pVerts = new SMD2Vert[m_Head.m_iNumVertices];
		//expand the verices
		memcpy(fScale, ucpTmpPtr, 12);
		memcpy(fTrans, ucpTmpPtr + 12, 12);
		memcpy(m_pFrames[i].m_caName, ucpTmpPtr + 24, 16);
		ucpTmpPtr += 40;
		for(int j = 0; j < m_Head.m_iNumVertices; j++)
		{

   //swap y and z coords to convert to the proper orientation on screen

   m_pFrames[i].m_pVerts[j].m_fVert[0] = ucpTmpPtr[0] * fScale[0] + 
   fTrans[0];

   m_pFrames[i].m_pVerts[j].m_fVert[1] = ucpTmpPtr[2] * fScale[2] + 
   fTrans[2];

   m_pFrames[i].m_pVerts[j].m_fVert[2] = ucpTmpPtr[1] * fScale[1] + 
   fTrans[1];
			m_pFrames[i].m_pVerts[j].m_ucReserved = ucpTmpPtr[3];
			ucpTmpPtr += 4;
		}
		
	}

	//Read in the triangles
	ucpTmpPtr = ucpPtr;
	ucpTmpPtr += m_Head.m_iOffsetTriangles;
	m_pTriangles = new SMD2Tri[m_Head.m_iNumTriangles];
	memcpy(m_pTriangles, ucpTmpPtr, 12 * m_Head.m_iNumTriangles);

	//Read the U/V texture coords
	ucpTmpPtr = ucpPtr;
	ucpTmpPtr += m_Head.m_iOffsetTexCoords;
	m_pTexCoords = new SMD2TexCoord[m_Head.m_iNumTexCoords];
	
	short * sTexCoords = new short[m_Head.m_iNumTexCoords * 2];
	memcpy(sTexCoords, ucpTmpPtr, 4 * m_Head.m_iNumTexCoords);

	for(i = 0; i < m_Head.m_iNumTexCoords; i++)
	{

  m_pTexCoords[i].m_fTex[0] = (float)sTexCoords[2*i] / m_Head.m_iSkinWidthPx;

  m_pTexCoords[i].m_fTex[1] = (float)sTexCoords[2*i+1] / m_Head.m_iSkinHeightPx;
	}
	
	delete [] sTexCoords;

	//Read the skin filenames
	ucpTmpPtr = ucpPtr;
	ucpTmpPtr += m_Head.m_iOffsetSkins;
	m_pSkins = new SMD2Skin[m_Head.m_iNumSkins];
	
	//Load textures
	for(i = 0; i < m_Head.m_iNumSkins; i++)
	{
		memcpy(m_pSkins[i].m_caSkin, ucpTmpPtr, 64);
		//hack off the leading parts and just get the filename
		char * szEnd = strrchr(m_pSkins[i].m_caSkin, '/');
		
		if(szEnd)
		{
			szEnd++;
			strcpy(m_pSkins[i].m_caSkin, szEnd);
		}

		m_pSkins[i].m_Image.Load(m_pSkins[i].m_caSkin);
		ucpTmpPtr += 64;
	}
		
	delete [] ucpBuffer;
	return true;
}
shadwolf:
14-Jan-2005
class CMd2 : public CModel
{
public:

	//Set skin to one of the files specified in the md2 files itself
	void SetSkin(unsigned int uiSkin);
	//Set skin to a different image
	void SetSkin(CImage& skin);

	//Load the file
	bool Load(const char * szFilename);
	
	//Render file at the initial position
	void Render();
	//Render the file at a certain frame
	void Render(unsigned int uiFrame);


 //Animate the md2 model (start and end frames of 0 and 0 will loop 
 through the WHOLE model

 void Animate(float fSpeed = 30.0f, unsigned int uiStartFrame = 0, 
 unsigned int uiEndFrame = 0, bool bLoop = true);

	//constructors/destructo
	CMd2();
	CMd2(const char * szFile);
	~CMd2();

private:
	
	CTimer m_Timer;
	//file header information
	SMD2Header m_Head; 
	//Frame information
	SMD2Frame * m_pFrames;
	//Triangles
	SMD2Tri * m_pTriangles;
	//Texure coords
	SMD2TexCoord * m_pTexCoords;
	//Skin files
	SMD2Skin * m_pSkins;
	//Interpolated vertices
	SMD2Vert * m_pVerts;
	//Current skin
	unsigned int m_uiSkin;
	//Using a custom skin?
	bool m_bIsCustomSkin;
	//The custom skin
	CImage * m_pCustSkin;

};
shadwolf:
14-Jan-2005
if you want to load 3 MD2 files you need only to make other main 
pointer to the information you retrieve from the file
shadwolf:
14-Jan-2005
in rebol you will need to load 3 files to declare SDM2Header_f1 SMD2Header_f3 
and SMD2Header_f3 with for both the stricly identical content tso 
your recoding 3 times or X times the same thing ...
shadwolf:
14-Jan-2005
I'm not an expert on struct! far of that (wel in C yes but in REBOL 
no and I think it's because I'm not using load/library capability 
until now) but that's a good discution to point to difficulties on 
this kind of task and I hope help rebol Core to have a bettre handling 
of that
Terry:
15-Jan-2005
Has anything changed with core regarding loading?  I'm trying to 
load a function using a URL, and it comes back as a block?
Terry:
15-Jan-2005
Has load become load/all ?
Sunanda:
15-Jan-2005
For anything other than a simple value, you've always got a block 
back from load (as far as I remember)
>> load "1"
== 1               --- a value
>> load "1 2"
== [1 2]               --- a block
>> load mold :to-idate
== [func .....         -- a block


>>
sqlab:
24-Jan-2005
load mold works too
>> t: rejoin [ [] to-word "[" to-word "]"]
== [[ ]]
>>  load mold  t
== [[]]
>> type? first load mold t
== block!
>>
Group: Script Library ... REBOL.org: Script library and Mailing list archive [web-public]
Sunanda:
8-Nov-2006
Apologies -- REBOL.org was unavailable for just under a day, it's 
back now.

The problem originated with the ISP, and it took them a little while 
to work out what they'd done wrong.

Using a "non-standard" language seems to have added to their debug 
time:
Extracts from two emails from the ISP's technical support:

<<Hi, Sunanda.  Sorry this is taking a bit.  As I'm sure you know 
you have

a non-standard setup :-)  We aren't familiar with it and are puzzling 
it

out.  Am I right that you have your own scripting language?  And 
that
[snipped] is the [path to the] interpreter?>>

<<Aha!  Our web server rebooted yesterday.  It's a FreeBSD server, 
and for

a reason we haven't determined yet, the Linux compatability module

didn't load.  We loaded it and your site works again.  We'll figure 
out
why that module didn't load at boot.>>
Sunanda:
16-Apr-2007
The Library itself already has some problems with this.

The Libraty code (lots of it) runs under an outdated version of REBOL.

And that has trouble doing a load/header on scripts written for later 
verisons.

It's an annoyance at the moment, and not worth fixing yet if we have 
to go through another remediation to fix code for R3
Sunanda:
16-Apr-2007
That would be a good solution, Graham, if:
1. it were able to then load and run the right .exe

2. the whole software stack runs the same version......Imagine the 
annoyance if you need one utility that needs and earlier / later 
executable? (I don't need to imagine that; it's happened already 
for me)
btiffin:
16-Apr-2007
Sunanda; I'm not a g-level rebol yet, but if you need to off load 
any mundane time-wasting low-brain work, send it this way and I might 
be able to help...willingness is there...skill? dunno.  :)
Anton:
30-Apr-2007
It's short, but still leaves room for confusion.

How about being more descriptive ? Eg. "validation-filtered-load" 
?
Sunanda:
30-Apr-2007
Assuming you don't just validate, but also load the data according 
to the filter, then coerce might be a good name:
  coerce [date! "1 jan 2007"] ==> 1-jan-2007
Sunanda:
1-May-2007
That's a nice idea for a sort of "REBOL explainer" application.
But it would be difficult to do in the Library.

The Library does attempt to load and parse scripts -- that's how 
we do the colorisation. But (as with Gabriele's code) we rely on 
REBOL's own reflective abilities to tell us what is a word, function, 
operator etc.

The Library runs an old version of Core (and even if we update that, 
we'd never run a version of View on a webserver) so it does not have 
access to all the information a proper explainer.highlighter would 
need.
Take this script for example:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?color=yes&script=reboldiff.r

'new-line is a valid REBOL word, but it is not colored: that's because 
it is not a word in the version we use.

So sadly, the colorisation at REBOL.or remains a nice bit of eye 
candy rather than a solidly dependable feature.
Sunanda:
1-May-2007
That's true -- not something we could do safely on a server.....Hence 
we are limited to load/header etc.

A desktop application may be able to be more daring -- provided you 
don't let arbitrary code out of the sandbox.
Anton:
4-Sep-2008
Hmm... How to do that?
We need to know where a particular
Maybe:
1. Read script *and* Load script
2. Visit each item in the loaded block, recursively.
3. As each item is visited, check its type.

4. Depending somewhat on type, parse (in the READed script) to the 
molded item:
4.1  If it's a series, search for the "opener", eg. block! -> "["
4.2  If it's a non-series, search for it molded.
4.3
Sunanda:
4-Sep-2008
We do index the files, and we have several indexes, some built by 
parsing parts of the script. So we can, usually, search for special 
parts of scripts -- like strings or comments.

Part of the difficulty is that there are some scripts that we cannot 
do a 'load or a 'load/header on - they are broken or have an incompatible 
'needs: header. So we cannot add those scripts to the sepcialised 
indexes. They need specialised handling :-)

Watch this space -- I'm fiddling with some code that may partially 
need your need.
Anton:
4-Sep-2008
Can't load ? Just skip it with with a warning message :) You still 
get your 99% solution.
Sunanda:
4-Sep-2008
If we can't load, we try a few tricks (like commenting out the needs: 
header and reloading).

But still, there are one ot two that we fail with. So they don't 
get as well indexed as the others...And (for the same reasons) they 
are the ones that appear in black and white even if you click the 
"view in color" link.
BrianH:
4-Sep-2008
For that matter, do you index line comments separately, as LOAD filters 
them out?
sqlab:
14-Apr-2009
Mike

I checked your library example from the I'm new group producing errors.

There is probably a weakness, as the script does not regard comment 
lines.
A short enhancement would be
   
parse-ini-file: func [
    file-name [file!]
   /local ini-block
    current-section
    parsed-line
    section-name
][
 ini-block: copy []
    current-section: copy []
    foreach ini-line read/lines file-name [
		if #";" <> first ini-line [ ; do not process comment lines
			section-name: ini-line
			error? try [section-name: first load/all ini-line]
			either any [
				error? try [block? section-name]
				not block? section-name
			][
				parsed-line: parse/all ini-line "="
				append last current-section parsed-line/1
				append last current-section parsed-line/2
			][
				append ini-block current-section
				current-section: copy []
				append current-section form section-name
				append/only current-section copy []
			] ;; either
		]
    ] ;; for
 append ini-block current-section
 return to-hash ini-block
 ]
BrianH:
24-Jun-2009
The Needs header works in R3, and is only checked on DO, not LOAD.
Sunanda:
9-Jul-2009
REBOL.org just migrated from the world's slowest single server to 
a small load balanced cluster.
Sadly, we're not superfast, but its early days yet.


One cosmetic problem: we're showing the date as 6 hours out. Highly 
trained techies are working to resolve that. Other than that, it 
was a smooth move, mainly handled by the ISP.
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
Anton:
2-Apr-2006
Good question, because the rebol.org script library will need some 
modification to path-thru to handle the url's with the '?' character 
in it. Normand, maybe you just want to change the VIEW-ROOT path 
within rebol. If is used by PATH-THRU, If you care to have a quick 
look at the source. And path-thru is used by exists-thru?, read-thru, 
load-thru... all the functions dealing with the public cache.
Tomc:
29-Jun-2006
integer? load string
Group: Make-doc ... moving forward [web-public]
Henrik:
11-Jan-2005
there seems to be some things missing (how to make bold and italic?) 
and I can't properly process multiple documents using makedoc2. the 
<html>, <body> and CSS code is only included in the first one, but 
not subsequent ones, if I 'load-only makedoc2 and follow the example 
shown in the source code.
Group: MySQL ... [web-public]
Maxim:
25-Jan-2005
The server I am accessing is very quick and in general, it accomplishes 
its query in micro seconds.  so its not really a question of server 
load...
Terry:
18-Feb-2005
try this from your rebol console.. 

do load http://powerofq.com/start
°load° "°mysqlprot°"


a: read join mysql://yourName:[yourPassword-:-localhost]/yourDatabaseName 
"show tables"
Tim:
18-Feb-2005
Here are the results: >> do load http://powerofq.com/start
connecting to: powerofq.com
>> load "mysqlprot"
== mysqlprot
a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"
>> a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"

** Access Error: Invalid port spec: mysql://tim:[password-:-localhost]/hs4ushow 
tables

** Near: a: read join mysql://tim:[password-:-localhost]/hs4u "show tables"
Group: Linux ... [web-public] group for linux REBOL users
Henrik:
3-Mar-2006
it's a load of crap. who has the resources to go through that? and 
do they really expect to find security holes by doing it?
[unknown: 10]:
22-Mar-2006
Its strange.. I should not be needing to run a fontserver..My desktop 
is already anti-aliased with fonts and so it the rest..But rebol 
still does not display it... mmm It does load the font though..(also 
when i look with an Strace during the execute rebol does read the 
font..) it simply does not display it ..yet! ;-)

>> probe fnt1

make object! [
    name: "/usr/X11R6/lib/X11/fonts/TTF/VeraMono.ttf"
    style: none
    size: 32
    color: 0.0.0
    offset: 2x2
    space: 0x0
    align: 'center
    valign: 'center
    shadow: none
]
Group: CGI ... web server issues [web-public]
Volker:
5-Dec-2005
2) decode-cgi builds the data itself AFAIK. does not use load. so 
all data should be strings. i am not sure about words, i guess they 
are bound. when you only fetch the words and turn them immediate 
in a string, that should be ok. the usual way is 
 construct decode-cgi
that result is save, because all words are bound to that context.
Pekr:
16-Aug-2006
according to Gabriele, Linux might have some default library locations 
... but e.g. I run sqlite as dll, and I point rebol to load the library 
and it loads it from anywhere. The question is, if the same is right 
for executable dependant libraries
Gabriele:
17-Aug-2006
petr, load/library is probably a bit different from what ldd does 
on startup. i suppose ldd wants current dir in the lib path to load 
libs from current dir (same issue as executing programs from current 
dir...)
Maarten:
22-Oct-2007
Now, what happens? The OS will start distributing the CGI processes 
over the multiple cores. Using the disk cache etc to speed loading 
times, enough memory per core on the processor. A 8Gb RAM quadcore 
should be able to run +- 1000 procs/sec (rough estimate). That's 
just one box, with that load it should be profitable. And as you 
obey rule 6, you can scale up and load balance pretty easily.
Gregg:
23-Oct-2007
Threads are much lighter, but not as separate. I don't know details 
though. On a dual core with hyper-threading on, spawning multiple 
processes, I can see the load is spread.
Maarten:
25-Nov-2007
But  yes: load-balancer -> webserver(*) -> FastCGI(*) -> MySQL
Maarten:
25-Nov-2007
As a rebol process is only 10 Mb.... I can serve lots of users on 
cheap VPS's, load balance them, data backup in S3.  No others invited 
until I get things stable enough. eed to ge things going
Pekr:
25-Nov-2007
I don't understand it a bit. I can understand webserver, fastcgi, 
mysql part, but what is that load-balancer part? Client side?
Maarten:
25-Nov-2007
No, before the webserver, so you scale transparantly to multiple 
webservers (in my scenario each webserver effectively is the load 
balancer for X FastCGI rebol processes; it's how nginx and lighty 
work)
Group: XML ... xml related conversations [web-public]
Volker:
28-Oct-2005
SAX is like parse. [a-tag another-tag (do-something) /a-tag]. DOM 
works like load does. AFAIK.
Volker:
28-Oct-2005
If its more like a block of records, it would be DOM. parse<->sax, 
load <-> DOM.
Volker:
28-Oct-2005
Thats what i understand from the overviews. Then comes how it works, 
and i am quickly back to real parse and load..
Volker:
28-Oct-2005
Yes, load is our tree, parse our events. Think of parse as "Here 
comes the word 'file. Yuppa, and a real 'file! . Good, and a 'binary!. 
(fine, now i store that data in that file)"
Volker:
28-Oct-2005
actually that description favors DOM. First, we dont want to save 
memory, we are scripters. We use load too.. Second, we are not strongly 
typed (they mean static typed). SO we can happily be generic.
Sunanda:
28-Oct-2005
True -- I'm only using it to load XML into a rebol structure for 
various reporting purposes. Not trying to round trip the data back 
to XMK after updating..
Chris:
30-Oct-2005
3) -- xml [doc: load %file.xml elmt: doc/get-element-by-id "foo" 
elmt/tag-name: "p" save %file.xml doc] -- just one example of how 
it might work...
Sunanda:
1-Nov-2005
Carl has talked several times about a binary format for saving REBOL 
structures (can't find any references off-hand).

That would probably solve this problem as what is saved is, in effect. 
the internal in-memory format: useless for non-REBOL data exchange 
and perhaps dangerous for cross-REBOL releases data exchange, but 
much much faster as it'd avoid most of the parse and load that REBOL 
does now.
Christophe:
2-Nov-2005
FYI, I have set 2 ppl working on an implementation of XPath into 
our XML function lib (temporary called "EasyXML"). Basically, we'll 
have 5 functions encapsulated into a context: 'load-xml file!, 'save-xml 
file!, 'get-data path! or block!, 'set-attribute string!, 'set-content 
string!
CarstenK:
7-Nov-2005
to John (or geomol),

first I've got the following error:
>> my-cdoc: xml2rebxml/preserve read %short.xml
** Syntax Error: Invalid word -- -->
** Near: (line 9) -->

So I replaced
  insert tail output load join "<!--" data
with
  insert tail output join "<!--" data
and it works fine with my files!


You were right, the replacements in text nodes are only &amp; &gt; 
&lt;. In attributes we need to escape the other 2 entities as allready 
done by you.
Geomol:
7-Nov-2005
Carsten, I think, your removal of LOAD in the error solution, you 
posted, does lead to some problems. But there also is a problem with 
the script, as it is now. I'm doing some investigation.
CarstenK:
7-Nov-2005
But if you have 10 or more you can collect them, maybe they print 
some report (time, errors etc.) and you avoid things like this: carstens 
removes a "load", it works for him, but breaks another piece of code. 
And often nobody writes test scripts/code. And the test scripts, 
if available, are always a good code base to learn how the real script 
should be used. I'll look into rebol-unit (but only tomorrow)...
Pekr:
11-Nov-2005
hmm, couldn't we just somehow mix the aproach, so to have some streamed 
dom? :-) I don't like the idea of having 10MB XML interchange file 
to load into memory ....
Maxim:
12-Apr-2006
my own  when I started the project I did not have many days to "get 
on with it" and for various reasons all the tools I tried didn't 
properly load the specification I was trying to load.
Maxim:
12-Apr-2006
my tool currenctly loads 1MB of xml tags in under a second.  its 
almost as fast as load/markup.
Pekr:
12-Apr-2006
does it work SAX way or DOM way? I mean - load first, then parse, 
or parse while reading way?
[unknown: 9]:
21-Apr-2006
We have done a little in Qtask.  WE save the tasks as XML (and call 
it XLS so that Excel can load it).
We will be writing an RSS reader soon.
Maxim:
27-Apr-2006
although getting XML:schema LOAD/SAVE , complete, native  XML 1.0 
LOAD/SAVE  that would at least allow us to start using XML in the 
first place  ;-)
Chris:
19-Nov-2008
; Usage:

do http://www.ross-gill.com/r/qxml.r
load-xml {<some xml="to">Try</some>}
Gregg:
19-Nov-2008
** Script Error: pop has no value
** Where: load-xml
** Near: mk: insert mk: back mk
Chris:
3-Dec-2008
>> load-xml {<some xml="to">Try</some>}
==  [
	<some>
		/xml "to"
		# "Try"
	]
]
Chris:
3-Dec-2008
>> load-xml "<try>This</try>"
== [
    <try> "This"
]
Chris:
3-Dec-2008
response: context [
	status: name: value: none
]

example: {<rsp>
	<status>Good</status>
	<payload>
		<value name="one">two</value>
	</payload>
</rsp>}

probe make response [
	parse load-xml example [
		<rsp> into [
			<status> set status ["Good" | "Bad"]
			<payload> into [
				<value> into [
					/name set name string! # set value string!
				]
			]
		]
	]
]
Chris:
3-Dec-2008
do http://www.ross-gill.com/r/qdom.r

doc: load-dom {<some><xml>to try</xml></some>}
values: doc/get-by-tagname <xml>
values/1/value = "to try"
Chris:
4-Dec-2008
Ok, another revision.  This has a few more methods, I may strip them 
down to read-only, as I don't need to manipulate the object though 
I left them in for completeness.

>> do http://www.ross-gill.com/r/qdom.r
connecting to: www.ross-gill.com
Script: "QuickDOM" (none)
>> doc: load-dom {<some><xml id="foo">to try</xml></some>}
>> foo: doc/get-by-id "foo"
>> foo/name
== <xml>
>> foo/value
== [
    /id "foo" 
    # "to try"
]
>> kids: foo/children
== [make object! [
        name: #
        value: "to try"
        tree: [
            # "to try"
        ]
        position: [
   ...
>> kids/1/value
== "to try"
>> doc/tree/<some>/<xml>/(#)           
== "to try"
Graham:
22-Jun-2009
format-xml: func [ xml
    /local out space prev
][
    out: copy ""
    spacer: copy ""
    prev: copy </tag>
    foreach tag load/markup xml [
        either tag = find tag "/" [
            ; we have a close tag
            

            ; reduce the spacer by a tab unless the previous was an open tag
            either not tag? prev [
                ; not a tag
                remove/part spacer 4
            ][
                ; is a tag
                if prev = find prev "/" [
                    ; last was a closing tag
                    remove/part spacer 4
                ]
            ]
        ][ 
            either tag? tag [
                ; current is tag
                ; indent only if the prev is not a closing tag
                if not prev = find prev "/" [
                    insert/dup spacer " " 4
                ]
            ][
                ; is data
                insert/dup spacer " " 4 
            ]
        ]
        repend out rejoin [ spacer tag newline ]
        prev: copy tag
    ]
	view layout compose [ area (out) 400x400 ]
]

obj2xml: func [ obj [object!] out [string!]
	/local o 
][
	foreach element next first obj [
		repend out [ to-tag element ]
		either object? o: get in obj element [
			obj2xml o out
		][
			repend out any [ o copy "" ]
		]		
		repend out [ to-tag join "/" element ]
	]
]
Group: PowerPack ... discussions about RP [web-public]
Robert:
28-May-2005
One major point wasn't said: We need a library system to handle all 
this. I won't use code, where I need to 'do zillions of single files 
in a specific order, handle path and lookup things, need local sub-directories 
to load images etc.


I'm still using Slim on my xpeers system, because that's the only 
thing I know about that handles all this quite well. And I can tell 
you, it pays off. Something like this is required.
Graham:
30-Jan-2010
So to use the power pack, we have to load the module system first 
....
Graham:
30-Jan-2010
I was just looking to see what I needed to use the html-filter function, 
and it seems I have to load the module system, and then import all 
stuff needed to run the html-filter ...
Group: PgSQL ... PostgreSQL and REBOL [web-public]
Oldes:
2-Mar-2007
but first load correct charset, for example:
ucs2/load-rules "ISO-8859-1"
Oldes:
2-Mar-2007
here are charset ids you can load into my scripts: print read http://box.lebeda.ws/~hmm/rebol/projects/ucs2/latest/charmaps.rb
MikeL:
28-Mar-2011
The error message seems to be the problem ... the table is CREATEd 
and is usable from new rebol sessions which load the protocol fresh.
Group: Sound ... discussion about sound and audio implementation in REBOL [web-public]
Rebolek:
27-Jun-2005
snd: load http://krutek.info/rebol/sound.r

view layout [
	button "play" [
		wav: make sound [rate: 22050 data: snd] 
		print "make wav" ? wav
		sndport: open sound:// 
		insert sndport wav 
		print "insert sound" ? wav
		close sndport
	]
]
Rebolek:
2-Feb-2006
Anyway, it works. In the bottom row, there are six buttons. Press 
second button (load sound) and go to %sounds/ directory. Select a 
sound and open it.
Sunanda:
17-Jun-2008
Can any one help me reply to this question (received via REBOL.org's 
feedback form)?
Thanks!
<<
Where can I find more Hex Code like in psg-ay-3-8910-study.r

Please point me to a tool that I can use for development of  Sound 
Code for the AY-3-8910 where I end up with Hex Code that I can then 
load into EPROMs which would drive the AY-3-8910. Thanks for any 
help.

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=psg-ay-3-8910-study.r
>>
amacleod:
15-Mar-2009
Any reason I can play pre-recorded .wav files but if try to make 
my own they do not work:

** Access Error: Bad image data
** Where: narrate
** Near: insert sound-port load talk
Steeve:
21-Apr-2009
you have to load a wav sample
Anton:
21-Apr-2009
Oldes, thanks. Do this

 load-thru/update http://anton.wildit.net.au/rebol/os/make-external-library-interface.r
then try again.
Group: Rebol School ... Rebol School [web-public]
BrianH:
4-Apr-2006
denismx, when I've taught REBOL to people, even people who are already 
familiar with other programming languages, it has been helpful to 
make the distinction between the REBOL language and the dialect engines.


REBOL is really a data model and related syntax, and a bundle of 
library functions that manipulate data in this model. A dialect is 
really a semantic model for interpreting this data, like what people 
think of as a language in real life. A dialect engine is a set of 
library functions that think of the data in the same way - I know 
this sounds anthropomorphic, but it makes it easier to explain REBOL 
if you think of the different dialect engines as entities that are 
acting on a set of commands you are giving them. You can even use 
role playing to demonstrate this, having one of your students act 
out the part. It also helps to name each of these models after the 
main function that implements them - otherwise people might not get 
the distinction between them and REBOL as a whole.


There are some functions that only deal with the REBOL data model 
and don't really do anything with the data other than translate it 
from or to some concrete syntax. It is best to group these functions 
by the syntax they implement - the group that implements what people 
normally think of as the REBOL syntax is LOAD, SAVE and MOLD.


When teaching REBOL dialects I usually start with what I call the 
DO engine, what people normally think of as the REBOL language. DO 
is a stack machine like Forth, but it uses a prefix syntax to make 
it easier to use (by making DO dialect code more resemble that in 
other programming languages). DO also does a simple swapping hack 
to implement inline operators, which you will have to demonstrate 
so that your students will understand DO's operator precedence or 
lack thereof. DO always works on REBOL data: If you pass it a string 
or file that contains REBOL syntax code, DO will call LOAD to convert 
it to REBOL data - this is an important distinction to make so that 
your students can distinguish between the data and the processor 
of that data. There are many functions that depend on DO to interpret 
their blocks of "code", such as IF, WHILE, FOR, etc. It is important 
to note that these are just functions, not "syntax". DO's only syntax 
is the predefined operators that DO swaps (these are effectively 
keywords because of how the swap is implemented), the word/set-word/get-word 
difference, the interpretation of paths and the precedence of parens. 
Everything else is a function.


There is also the PARSE engine, a rule-based recursive-decent parser 
with limited backtracking, that implements three dialects (simple 
parse, string parse and block parse). These dialects actually have 
keywords, as well as an entirely different execution model. Also, 
there is the View engine, which implements the LAYOUT and DRAW dialects.


Refering to these engines as state machines isn't helpful, because 
the distinctions between their execution models, or whether they 
even have execution models, is important for distinguishing between 
them. You need to use the higher-level terms like stack machine, 
composition engine and such.

I hope this helps!
denismx:
19-Apr-2006
Actually, since Von Neuman, code is treated as data. You load it 
into memory and process is as a special kind of data.
Anton:
22-Apr-2006
Ok, so here's my frequency table:
    6 compose 
    5 as-pair 
    5 func 
    4 do 
    3 show 
    2 all 
    2 copy 
    2 find 
    2 form 
    2 get 
    2 in 
    2 pick 
    2 print 
    2 to-image 
    2 use 
    1 * 
    1 + 
    1 - 
    1 <> 
    1 = 
    1 append 
    1 bind 
    1 center-face 
    1 change 
    1 clear 
    1 context 
    1 do-events 
    1 either 
    1 first 
    1 foreach 
    1 if 
    1 join 
    1 layout 
    1 load-thru 
    1 make 
    1 mold 
    1 object? 
    1 reduce 
    1 remold 
    1 remove-each 
    1 repeat 
    1 second 
    1 select 
    1 to-pair 
    1 to-path 
    1 view
Anton:
5-May-2006
read file --> string
load file --> block
Anton:
5-May-2006
Strings and blocks are both series, so first, next find etc work 
on both, but when you load you get a block and the units are values. 
When you read, you have a string and the units are characters.
Anton:
5-May-2006
When you load, the file has to be LOADable by rebol, which means 
everything in it must be parseable into rebol values.

When you read, the file can be absolutely anything. I usually have 
to read web pages and parse a string, for instance.
Group: RT Q&A ... [RT Q&A] Questions and Answers to REBOL Technologies [web-public]
Gabriele:
11-Dec-2005
Q: (note - my view may be influenced by insufficient knowledge in 
the area given) - last weeks I played with wrapping some Win32 functions. 
I started discussion on dll.so channel, to ask developers, if they 
would enhance interfacing to C libraries in some way, and there was 
few ideas appearing. We currently have also rather strange callbacks 
support (limited to 16) and I would like to ask, taking into account 
that DLL interface in Rebol was not changed/enhanced since it appeared 
long time ago, if RT sees any area in which it could be made more 
robust, developers friendly etc.?


A: We are planning to do a lot more on DLLs. In fact, future versions 
of REBOL will expand on the way DLLs are used in REBOL.   For example, 
I would like to see DLL support for media loaders and savers, so 
if we do not directly support a specific type of media file (say, 
TIFF) then an external DLL can be provided to load it.  There are 
a few other DLL related features down the road, but it is still a 
bit early to talk about them.



Q: I realize that the open sourcing of the viewtop wasn't that successful, 
but do you still intend to keep releasing newer versions of it? AFAIK 
the current release is over a year old. I've experienced a lot of 
obvious bugs in the viewtop editor, which I think can easily be solved 
by people outside RT.


A: yes we will continue to release newer versions.  View 1.3.2 fixed 
a number of bugs in the Viewtop editor that were listed in on RAMBO. 
Any fixes and enhancements from the community are greatly appreciated 
(by everyone, not only RT!)  You can post them to RAMBO, and we will 
review and include them (if they look good).



Q: While reviewing the action! functions, I noticed the path action. 
The doc comment says "Path selection.". The parameters aren't typed. 
Does anyone know what this action does, and how to use it? Or whether 
it can be or should be called directly at all?


A: the PATH action is what the interpreter uses to evaluate VALUE/selector 
expressions for each datatype. It is an internal action and has no 
external purpose in programs. These kinds of words often appear as 
a sort of "side-effect" from how REBOL is structured.  Datatypes 
are implemented as a sort of object class, where the interpreter 
"sends messages" to the class to evaluate expressions. The PATH action 
is a message that tells the datatype to perform a pick-like or poke-like 
internal function.


Q: Is rebcode going to support paths and/or some kind of binding?


A: Certain rebcode can support anything we feel is important to put 
into it, but note: many things we add could slow it down, by a lot. 
 For example, if we were to allow paths as variables, I estimate 
that rebcode would be about two times slower than it is now.  Perhaps 
one way to solve this issue is for you to use COMPOSE prior to specifying 
your rebcode body.  Within the compose, you can use IN object 'word 
to "pre-compute" the context references for words. For example:

    add.i (in object 'num) 10


Your question about binding is not clear to me. Rebcode already supports 
binding. Your rebcode can be part of an object context, and rebcode 
function words are bound to the code context.  (Perhaps you are referring 
to an older bug that has since been fixed?)



Q: What do you think about  http://mail.rebol.net/maillist/msgs/39493.html
? Why not say a word in your blog, if you think that it's interessant 
for rebol developpment, and if you want to contact them ?


A: Recently, I had the chance to sit down and talk with one of the 
main people from the One Laptop Per Child project (he is a friend 
of mine from Apple Computer days).  The project has an interesting 
goal, but there are also many difficult issues around it (not just 
in the technical side, but also on the social and cultural sides). 
My current understanding is that the target software is Smalltalk 
based. Yes, it would be very interesting to allow REBOL on that system, 
but if you look at the list of principals for the project, you will 
see that such a revolution is unlikely.  Is it possible that perhaps 
REBOL could provide some additional capability in the future? I think 
so. We have some special plans that I think will bring REBOL to platforms 
like that in the future. But, this is too early to say more.



Q: 1. What is fixed/added in 2.6.2/1.3.2 (change-log, please) ? 2. 
What is planned for 1.4.0 (rebcode, rebservices, rich-text, RIF, 
and last but not least, fixed sound ...) ? 3. When can we expect 
1.4.0 ? Thanks.


A: 1. Gregg is preparing a summary. The document should be available 
this week. 2. We are evaluating a large variety of changes in REBOL, 
more than even the 1.4 release that we've talked about.  I hope to 
be able to say more about these plans soon.
Group: Windows/COM Support ... [web-public]
Anton:
4-Dec-2005
Yes ... I could publish it, as now it is pretty much the same interface 
as Ben's. However, I plan to totally rearrange all that (probably), 
so my distro will be hard to keep up with for a while... Mmm... what 
to do... Work faster I suppose.. :)

I *could* release this version and fork again for future rearrangements, 
but I am not keen to double the work-load...
Group: !Liquid ... any questions about liquid dataflow core. [web-public]
Pekr:
7-May-2007
I wonder if other languages could benefit from View? I know they 
have e.g. wxWidgets, but not sure how easy would it be to integrate? 
Maybe with R3 as a whole, pythonists can link/load "rebol library" 
to do so :-) View simply needs rebol interpreter ...
Group: Games ... talk about using REBOL for games [web-public]
ICarii:
4-Jun-2007
timer/load/save game are done - just trying to see how I should do 
the scoring - whether there are penalties for shuffling, undo etc
ICarii:
5-Jun-2007
Mahjong updated with save/load, scoring, timer, fixed ricebowl map 
and other general craziness.  http://rebol.mustard.co.nz/mahjong.zip
 or http://rebol.mustard.co.nz/mahjong.rif you dont care about the 
bad ricebowl.map
ICarii:
5-Jun-2007
save/load does NOT currently save score/timer - ill fix that tomorrow
ICarii:
5-Jun-2007
if i can get them to load - im getting 404 errors here
201 / 232912[3] 45...2021222324