Mikael Pettersson | 1 May 2009 01:48
Picon
Picon
Favicon

Re: A bug? - bloom filters - and loadable BIFs

Steve Kirsch writes:
 > Wow. That is very cool. And if the bitarray is large enough, it is
 > passed by reference in a message. Awesome.
 > 
 > So is there a way to set a byte or word at a time??

No, and yes.

No, because the bitarray API really is like a plain array API
with the element size being a single bit, so there's no concept
of "multiple elements" in it.

Yes, because HiPE also adds a bytearray API similar to the bitarray
API I've described, and although bitarrays and bytearrays are unrelated
at the API level they happen to have the same representation, so it's
possible to (ab)use bytearray ops on bitarray objects and vice versa.

I'm only mentioning this because you've indicated a willingness to
accepts the caveats of relying on undocumented features. If you do
start using these features you should really have pure Erlang fallbacks
in place if/when these undocumented BIFs change.

 > -----Original Message-----
 > 
 > hipe_bifs:bitarray(NrArrayBits, InitialBitValue) -> BitArray
 > hipe_bifs:bitarray_sub(BitArray, BitNr) -> BitValue
 > hipe_bifs:bitarray_update(BitArray, BitNr, BitValue) -> BitArray
 > 
 > Bit values are the booleans true and false.
 > Array indexing is 0-based (1-based indexing is just sooo wrong).
(Continue reading)

Kevin | 1 May 2009 01:58
Picon
Favicon

Sending messages to multiple processes?


Is there a neato idiom for sending a single message to multiple 
processes, up to say 200, or do I just need to loop it?

I also need to know they finished processing the message.  Is this the 
wrong road to go down? 

Basically I'm starting 200 processes, reading in a single file, and each 
process is fed the same line of the file one by one until the end, but 
they all handle it differently, and when they have finished all the 
lines, they spit out a modified file, and return a value to indicate 
they are finished.

Thanks for any advice,
Kevin
Mikael Pettersson | 1 May 2009 02:13
Picon
Picon
Favicon

Re: A bug? - bloom filters - and loadable BIFs

Steve Kirsch writes:
 > is there a way to do a destructive setelement?
 > 
 > This is in the VM, but the compiler rarely generates it.
 > 
 > Is there a way to force this?

Not really. Destructive setelement/3 is not trivial.

First there's the general avoidance of mutable data structures in
Erlang, and destructive setelement/3 in that setting is a step in
the wrong direction.

Second, having destructive updates of general collection-like objects
(cons cells, tuples) in any system with a generational garbage collector,
such as Erlang/OTP, _requires_ specific support from the garbage collector
(for handling so-called wrong-way pointers). Since the Erlang language
doesn't support mutable general collection-like objects, the Erlang/OTP VM
garbage collector doesn't either.

The BEAM Erlang compiler is able to identify certain kinds of
setelement/3 operations which can safely use destructive updates
(mainly record initialisations as I recall), and for those it uses
the VM's destructive setelement/3 operation.

However, giving programmers direct access to destructive setelement/3
is both unsafe and against the spirit of Erlang, so it's not going to
happen any time soon.

 > -----Original Message-----
(Continue reading)

Camille Troillard | 1 May 2009 02:33
Picon

Re: open_port and port_close semantics

Thank you Richard.



On Thu, Apr 30, 2009 at 2:00 PM, Richard Andrews <bbmaj7 <at> yahoo.com.au> wrote:
On close a port program may need to perform additional steps to close down gracefully, turn off hardware, log out of facilities, remove files, log events, etc.

A heartbeat system is effective if the pipe closure event is not reliably delivered; ie. exit if no event from the erlang node for N seconds.

If erlang is exiting gracefully then send a shutdown command to the port program and wait for the port to be closed.

--
  Rich

From: Camille Troillard <tuscland <at> gmail.com>
To: erlang-questions <at> erlang.org
Sent: Thursday, 30 April, 2009 8:50:09 PM
Subject: [erlang-questions] open_port and port_close semantics

Hello,

I am trying to understand the semantics of open_port and port_close.
I was expecting port_close to send a quit signal to the child process, but it merely close the file handlers from what I've read in the doc and trapexit forums.

What is the reason behind this?
How do you make sure there are no leftover processes when the application shuts down?


Enjoy a better web experience. Upgrade to the new Internet Explorer 8 optimised for Yahoo!7. Get it now..

<div>
<p>Thank you Richard.</p>
<div>
<br><br><div class="gmail_quote">On Thu, Apr 30, 2009 at 2:00 PM, Richard Andrews <span dir="ltr">&lt;<a href="mailto:bbmaj7 <at> yahoo.com.au">bbmaj7 <at> yahoo.com.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<div>
<div>
<div>On close a port program may need to perform additional steps to close down gracefully, turn off hardware, log out of facilities, remove files, log events, etc.<br><br>A heartbeat system is effective if the pipe closure event is not reliably delivered; ie. exit if no event from the erlang node for N seconds.<br><br>If erlang is exiting gracefully then send a shutdown command to the port program and wait for the port to be closed.<br><br>--<br>&nbsp; Rich<br>
</div>
<div>
<br><div>
<span>From:</span> Camille Troillard &lt;<a href="mailto:tuscland <at> gmail.com" target="_blank">tuscland <at> gmail.com</a>&gt;<br><span>To:</span> <a href="mailto:erlang-questions <at> erlang.org" target="_blank">erlang-questions <at> erlang.org</a><br><span>Sent:</span> Thursday, 30 April, 2009 8:50:09 PM<br><span>Subject:</span> [erlang-questions] open_port and port_close semantics<br><div>
<div></div>
<div class="h5">
<br>Hello,<div><br></div>
<div>I am trying to understand the semantics of open_port and port_close.</div>
<div>I was expecting port_close to send a quit signal to the child process, but it merely close the file handlers from what I've read in the doc and trapexit forums.</div>

<div><br></div>
<div>What is the reason behind this?</div>
<div>How do you make sure there are no leftover processes when the application shuts down?</div>
<br>
</div>
</div>
</div>
</div>
</div>
<div class="hm">
<br>Enjoy a better web experience. Upgrade to the new Internet Explorer 8 optimised for Yahoo!7. <a href="http://au.rd.yahoo.com/search/ie8/mailtagline/*http://us.lrd.yahoo.com/_ylc=X3oDMTJxbnQwdTJhBF9zAzIxNDIwMjU2NTkEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzQ0OAR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=11k6t9t1c/**http://downloads.yahoo.com/au/internetexplorer/" target="_blank">Get it now.</a>.</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
Camille Troillard | 1 May 2009 02:35
Picon

Re: open_port and port_close semantics

Hi Dave,


Strangely enough I though it was killing my process but after some usage, I found it was not true, at least in my application.  I will implement a shutdown message which seems totally right regarding resource cleanup.


Cam

On Thu, Apr 30, 2009 at 3:53 PM, Dave Bryson <daveb <at> miceda.org> wrote:

I'm pretty sure 'port_close' sends an exit signal to the child process (have not confirmed from src) .  At least in my application it kills the child process.  However in most cases I'll send my own stop message to the child process and have it call exit on itself so it can do any clean-up necessary.

Dave


On Apr 30, 2009, at 5:50 AM, Camille Troillard wrote:

Hello,

I am trying to understand the semantics of open_port and port_close.
I was expecting port_close to send a quit signal to the child process, but it merely close the file handlers from what I've read in the doc and trapexit forums.

What is the reason behind this?
How do you make sure there are no leftover processes when the application shuts down?


Thanks!
Cam

_______________________________________________
erlang-questions mailing list
erlang-questions <at> erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions


<div>
<p>Hi Dave,</p>
<div><br></div>
<div>Strangely enough I though it was killing my process but after some usage, I found it was not true, at least in my application. &nbsp;I will implement a shutdown message which seems totally right regarding resource cleanup.</div>
<div><br></div>
<div><br></div>
<div>Cam<br><div>
<br><div class="gmail_quote">On Thu, Apr 30, 2009 at 3:53 PM, Dave Bryson <span dir="ltr">&lt;<a href="mailto:daveb <at> miceda.org">daveb <at> miceda.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote">
<br>
I'm pretty sure 'port_close' sends an exit signal to the child process (have not confirmed from src) . &nbsp;At least in my application it kills the child process. &nbsp;However in most cases I'll send my own stop message to the child process and have it call exit on itself so it can do any clean-up necessary.<br><br>
Dave<div>
<div></div>
<div class="h5">
<br><br>
On Apr 30, 2009, at 5:50 AM, Camille Troillard wrote:<br><br>
</div>
</div>
<blockquote class="gmail_quote">
<div>
<div></div>
<div class="h5">
Hello,<br><br>
I am trying to understand the semantics of open_port and port_close.<br>
I was expecting port_close to send a quit signal to the child process, but it merely close the file handlers from what I've read in the doc and trapexit forums.<br><br>
What is the reason behind this?<br>
How do you make sure there are no leftover processes when the application shuts down?<br><br><br>
Thanks!<br>
Cam<br><br>
</div>
</div>
_______________________________________________<br>
erlang-questions mailing list<br><a href="mailto:erlang-questions <at> erlang.org" target="_blank">erlang-questions <at> erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
Jacob Perkins | 1 May 2009 02:37
Picon
Gravatar

Re: Reading An Mnesia Index (Not The Records It Points To)

It'd probably be easier to manage the index yourself as a separate table. Maybe an ordered_set table where the record is something like {key={indice, record_id}, val=val}. Then you can match on the indice to pull out record_ids and vals.

Jacob

I have an index on a table that represents a user taxonomy - how the
user has chosen to organise their world in the application.

It is a fairly dense index, that is for each indice there will be
between 30 and several hundred actual records.

At the moment to expose the taxonomy to the user I have to build a
query that returns the value of the index from every record, and then
de-duplicate that back down to get the index - which has been slow on
occasions...

As far as I can tell there is no way through the published API to
simply 'read the index' but I am sure I could plow into the code and
'work it out' but I am wary of the old 'undocumented API' beartrap.

Any suggestions?

Gordon
<div>
<p>It'd probably be easier to manage the index yourself as a separate table. Maybe an ordered_set table where the record is something like {key={indice, record_id}, val=val}. Then you can match on the indice to pull out record_ids and vals.<br><br>Jacob<br><br></p>
<blockquote class="gmail_quote">I have an index on a table that represents a user taxonomy - how the<br>
user has chosen to organise their world in the application.<br><br>
It is a fairly dense index, that is for each indice there will be<br>
between 30 and several hundred actual records.<br><br>
At the moment to expose the taxonomy to the user I have to build a<br>
query that returns the value of the index from every record, and then<br>
de-duplicate that back down to get the index - which has been slow on<br>
occasions...<br><br>
As far as I can tell there is no way through the published API to<br>
simply 'read the index' but I am sure I could plow into the code and<br>
'work it out' but I am wary of the old 'undocumented API' beartrap.<br><br>
Any suggestions?<br><br>
Gordon<br>
</blockquote>
</div>
Davide Marquês | 1 May 2009 03:37
Picon

Re: Sending messages to multiple processes?

Hi Kevin,

Is there a neato idiom for sending a single message to multiple
processes, up to say 200, or do I just need to loop it?
No "idiom" that I'm aware of.
You can use the pg module to group a bunch of processes together and
send them messages via the group name. Info:
http://www.erlang.org/doc/man/pg.html
http://erlang.org/doc/man/pg2.html

I also need to know they finished processing the message.  Is this the
wrong road to go down?
That's just a matter of sending the "master process" Pid to the
workers/slaves when they are started and having then report back when
they're done.
 
Basically I'm starting 200 processes, reading in a single file, and each
process is fed the same line of the file one by one until the end, but
they all handle it differently, and when they have finished all the
lines, they spit out a modified file, and return a value to indicate
they are finished.

For this simple case you can stick to your own master/slave processes. :)
 
Thanks for any advice,
Kevin
_______________________________________________
erlang-questions mailing list
erlang-questions <at> erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions



<div>
<p>Hi Kevin,<br><br></p>
<div class="gmail_quote">
<blockquote class="gmail_quote">
Is there a neato idiom for sending a single message to multiple<br>
processes, up to say 200, or do I just need to loop it?</blockquote>
<div>No "idiom" that I'm aware of.<br>You can use the pg module to group a bunch of processes together and<br>send them messages via the group name. Info:<br><a href="http://www.erlang.org/doc/man/pg.html">http://www.erlang.org/doc/man/pg.html</a><br><a href="http://erlang.org/doc/man/pg2.html">http://erlang.org/doc/man/pg2.html</a><br><br>
</div>
<blockquote class="gmail_quote">

I also need to know they finished processing the message. &nbsp;Is this the<br>
wrong road to go down?</blockquote>
<div>That's just a matter of sending the "master process" Pid to the<br>workers/slaves when they are started and having then report back when<br>they're done.<br>&nbsp;</div>
<blockquote class="gmail_quote">
Basically I'm starting 200 processes, reading in a single file, and each<br>
process is fed the same line of the file one by one until the end, but<br>
they all handle it differently, and when they have finished all the<br>
lines, they spit out a modified file, and return a value to indicate<br>
they are finished.</blockquote>
<div>
<br>For this simple case you can stick to your own master/slave processes. :)<br>&nbsp;<br>
</div>
<blockquote class="gmail_quote">

Thanks for any advice,<br>Kevin<br>
_______________________________________________<br>
erlang-questions mailing list<br><a href="mailto:erlang-questions <at> erlang.org">erlang-questions <at> erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
<br><br>
</div>
<br>
</div>
G.S. | 1 May 2009 05:01
Picon

Re: Sending messages to multiple processes?

Is the broadcasting of msgs using pg or pg2 faster than simply having a list of pids and looping through them?

2009/4/30 Davide Marquês <nesrait <at> gmail.com>
Hi Kevin,

Is there a neato idiom for sending a single message to multiple
processes, up to say 200, or do I just need to loop it?
No "idiom" that I'm aware of.
You can use the pg module to group a bunch of processes together and
send them messages via the group name. Info:
http://www.erlang.org/doc/man/pg.html
http://erlang.org/doc/man/pg2.html

I also need to know they finished processing the message.  Is this the
wrong road to go down?
That's just a matter of sending the "master process" Pid to the
workers/slaves when they are started and having then report back when
they're done.
 
Basically I'm starting 200 processes, reading in a single file, and each
process is fed the same line of the file one by one until the end, but
they all handle it differently, and when they have finished all the
lines, they spit out a modified file, and return a value to indicate
they are finished.

For this simple case you can stick to your own master/slave processes. :)
 
Thanks for any advice,
Kevin
_______________________________________________
erlang-questions mailing list
erlang-questions <at> erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions




_______________________________________________
erlang-questions mailing list
erlang-questions <at> erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions

<div>
<p>Is the broadcasting of msgs using pg or pg2 faster than simply having a list of pids and looping through them? <br><br></p>
<div class="gmail_quote">2009/4/30 Davide Marqu&ecirc;s <span dir="ltr">&lt;<a href="mailto:nesrait <at> gmail.com">nesrait <at> gmail.com</a>&gt;</span><br><blockquote class="gmail_quote">Hi Kevin,<br><br><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote">

Is there a neato idiom for sending a single message to multiple<br>
processes, up to say 200, or do I just need to loop it?</blockquote></div>
<div>No "idiom" that I'm aware of.<br>You can use the pg module to group a bunch of processes together and<br>send them messages via the group name. Info:<br><a href="http://www.erlang.org/doc/man/pg.html" target="_blank">http://www.erlang.org/doc/man/pg.html</a><br><a href="http://erlang.org/doc/man/pg2.html" target="_blank">http://erlang.org/doc/man/pg2.html</a><br><br>
</div>
<div class="im"><blockquote class="gmail_quote">

I also need to know they finished processing the message. &nbsp;Is this the<br>
wrong road to go down?</blockquote></div>
<div>That's just a matter of sending the "master process" Pid to the<br>workers/slaves when they are started and having then report back when<br>they're done.<br>
&nbsp;</div>
<div class="im">
<blockquote class="gmail_quote">
Basically I'm starting 200 processes, reading in a single file, and each<br>
process is fed the same line of the file one by one until the end, but<br>
they all handle it differently, and when they have finished all the<br>
lines, they spit out a modified file, and return a value to indicate<br>
they are finished.</blockquote>
</div>
<div>
<br>For this simple case you can stick to your own master/slave processes. :)<br>&nbsp;<br>
</div>
<div class="im">
<blockquote class="gmail_quote">

Thanks for any advice,<br>Kevin<br>
_______________________________________________<br>
erlang-questions mailing list<br><a href="mailto:erlang-questions <at> erlang.org" target="_blank">erlang-questions <at> erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
<br><br>
</div>
</div>
<br><br>_______________________________________________<br>
erlang-questions mailing list<br><a href="mailto:erlang-questions <at> erlang.org">erlang-questions <at> erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote>
</div>
<br>
</div>
Kenji Rikitake | 1 May 2009 06:07
Picon
Favicon
Gravatar

Re: Inets and IPv6 (noob)

In the message <C61D2E52.10FB0%mtalyans <at> cisco.com>
dated Tue, Apr 28, 2009 at 10:05:46PM -0700,
Michael Talyansky <mtalyans <at> cisco.com> writes:
> On BSD, server was binding to (and listening on) IPv4 address. On Linux, it
> binds to IPv6 only (verified with netstat), unless I explicitly specify IPv4
> interface address in the bind_address tuple.

On Ubuntu 8.10 and 9.04, IPv6 is enabled as default.

See the following code from R13B; IPv6 takes precedence higher than
IPv4, if enabled.

%%% quoted from R13B lib/inets/src/http_server/httpd_util.erl
ip_address(Host) ->
    Inet = case gen_tcp:listen(0, [inet6]) of
               {ok, Dummyport} ->
                   gen_tcp:close(Dummyport),
                   inet6;
               _ ->
                   inet
           end,
    inet:getaddr(Host, Inet).
%%% unquote

> What should I set and where in order for the server to bind to both IPv4 and
> IPv6 addresses?

You should not do this, at least on FreeBSD (and other *BSDs), because
IPV6_V6ONLY is effective as default (see sysctl net.inet6.ip6.v6only).
(See also RFC3493 Section 5.3) In such an environment, you have to bind
separately to each of IPv4 and IPv6 addresses.

> I am using R13B, on BSD it was R13A. Could this be a factor?

I haven't checked out the R13A code, but on R12B5 the code was

%%% quoted from R12B5 lib/inets/src/http_server/httpd_util.erl
ip_address(Host) ->
    case (catch inet:getaddr(Host,inet6)) of
        {ok, {0, 0, 0, 0, 0, 16#ffff, _, _}} ->
            inet:getaddr(Host, inet);
        {ok, IPAddr} ->
            {ok, IPAddr};
        _ ->
            inet:getaddr(Host, inet)
    end.
%%% unquote

so the implementation might be changed.

(Note that {0, 0, 0, 0, 0, 16#ffff, _, _} represents the set of
IPv4-mapped address, which does not work on BSD and should be
deprecated.)

Kenji Rikitake
Carl McDade | 1 May 2009 06:46
Picon
Gravatar

Re: Edoc syntax

Well, yes and no. I guess the key work is "like". :) More like how Javadoc inter-spaces the class or method source on the HTML page so that you can follow along. Doxygen and PHPdocumentor are popular because of this. You can see examples of what I mean at http://api.drupal.org/api/function/node_add/6 where they use Doxygen output.

I guess this would be the job of the edoc-info file. But I have not found much on how to use this or its features and limitations.

http://api.drupal.org/api/function/node_add/6

modules/node/node.pages.inc, line 46

Versions4.6 – 4.7node_add($type) 5node_add($type = NULL)6 – 7 node_add($type)

Present a node submission form or a set of links to such forms.

Code

<?php
function node_add($type) {

global $user;

$types = node_get_types();
$type = isset($type) ? str_replace('-', '_', $type) : NULL;

// If a node type has been specified, validate its existence.
if (isset($types[$type]) && node_access('create', $type)) {
// Initialize settings:
$node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');


drupal_set_title(t('Create <at> name', array(' <at> name' => $types[$type]->name)));

$output = drupal_get_form($type .'_node_form', $node);

}

return $output;
}
?>




--
Carl McDade
Content Management Systems Consultant
www.hiveminds.co.uk
________________________
<div>
<p>Well, yes and no. I guess the key work is "like". :) More like how
Javadoc inter-spaces the class or method source on the HTML page so
that you can follow along. Doxygen and PHPdocumentor are popular
because of this. You can see examples of what I mean at <a href="http://api.drupal.org/api/function/node_add/6" target="_blank">http://api.drupal.org/api/function/node_add/6</a> where they use Doxygen output.<br><br>I guess this would be the job of the edoc-info file. But I have not
found much on how to use this or its features and limitations.<br><br><a href="http://api.drupal.org/api/function/node_add/6" target="_blank">http://api.drupal.org/api/function/node_add/6</a><br><br></p>
<p>modules/node/≤a href="http://api.drupal.org/api/file/modules/node/node.pages.inc/6" target="_blank">node.pages.inc</a>, line 46</p>

Versions<a href="http://api.drupal.org/api/function/node_add/4.7" target="_blank">4.6 &ndash; 4.7</a><a href="http://api.drupal.org/api/function/node_add/4.7" target="_blank">node_add($type)</a>
<a href="http://api.drupal.org/api/function/node_add/5" target="_blank">5</a><a href="http://api.drupal.org/api/function/node_add/5" target="_blank">node_add($type = NULL)</a>6 &ndash; 7
node_add($type)<p>Present a node submission form or a set of links to such forms.</p>

<h3>Code</h3>
<span>&lt;?php<br></span><span>function</span> <span><a href="http://api.drupal.org/api/function/node_add/6" title="Present a node submission form or a set of links to such forms." target="_blank">node_add</a></span>(<span>$type</span>) {<br><br><span>global</span> <span>$user</span>;<br><br><span>$types</span> = <span><a href="http://api.drupal.org/api/function/node_get_types/6" title="Builds a list of available node types, and returns all of part of this list
in the specified format." target="_blank">node_get_types</a></span>();<br><span>$type</span> = <span>isset</span>(<span>$type</span>) ? <a href="http://php.net/str_replace" title="mixed str_replace(mixed search, mixed replace, mixed subject [, int &amp;replace_count]) 
     Replaces all occurrences of search in haystack with replace" target="_blank">str_replace</a>(<span>'-'</span>, <span>'_'</span>, <span>$type</span>) : <span>NULL</span>;<br><br><span>// If a node type has been specified, validate its existence.<br></span>  <span>if</span> (<span>isset</span>(<span>$types</span>[<span>$type</span>]) &amp;&amp; <span><a href="http://api.drupal.org/api/function/node_access/6" title="Determine whether the current user may perform the given operation on the
specified node." target="_blank">node_access</a></span>(<span>'create'</span>, <span>$type</span>)) {<br><span>// Initialize settings:<br></span>    <span>$node</span> = <span>array</span>(<span>'uid'</span> =&gt; <span>$user</span>-&gt;<span>uid</span>, <span>'name'</span> =&gt; (<span>isset</span>(<span>$user</span>-&gt;<span>name</span>) ? <span>$user</span>-&gt;<span>name</span> : <span>''</span>), <span>'type'</span> =&gt; <span>$type</span>, <span>'language'</span> =&gt; <span>''</span>);<br><br><br><span><a href="http://api.drupal.org/api/function/drupal_set_title/6" title="Set the title of the current page, for display on the page and in the title bar." target="_blank">drupal_set_title</a></span>(<span><a href="http://api.drupal.org/api/function/t/6" title="Translate strings to the page language or a given language." target="_blank">t</a></span>(<span>'Create  <at> name'</span>, <span>array</span>(<span>' <at> name'</span> =&gt; <span>$types</span>[<span>$type</span>]-&gt;<span>name</span>)));<br><br><span>$output</span> = <span><a href="http://api.drupal.org/api/function/drupal_get_form/6" title="Retrieves a form from a constructor function, or from the cache if
the form was built in a previous page-load. The form is then passesed
on for processing, after and rendered for display if necessary." target="_blank">drupal_get_form</a></span>(<span>$type</span> .<span>'_node_form'</span>, <span>$node</span>);<br><br>  }<br><br><span>return</span> <span>$output</span>;<br>
}<br><span>?&gt;</span><br><br><br><br clear="all"><br>-- <br>Carl McDade<br>Content Management Systems Consultant<br><a href="http://www.hiveminds.co.uk">www.hiveminds.co.uk</a><br>________________________<br>
</div>

Gmane