<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: t_hashtab and funall( ) order ?</title>
		<atom:link href="http://cycling74.com/forums/topic/t_hashtab-and-funall-order/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/feed</link>
		<description></description>
		<pubDate>Mon, 17 Jun 2013 21:47:23 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-48584</guid>
					<title><![CDATA[t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-48584</link>
					<pubDate>Thu, 18 Feb 2010 17:15:06 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello maxers,</p>
<p>the SDK says : <em></em></p>
<p>&#8220;You can iterate through all items using hashtab_funall ( ), but the exact order is not under your control as items are added and removed.&#8221; </p>
<p>Is anybody know a little bit more about that ? Is it First In First Out, Last In First Out, Random, or anything else ? </p>
<p>((( As i try to deal with asynchronous algorithmic stuff, it should be nice for me to know in which order i apply my function on element of the hashtab ; the ideal should be CHAOS of course ! )))</p>
<p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174704</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174704</link>
					<pubDate>Thu, 18 Feb 2010 21:51:20 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>You can basically think of it as random. The symbol pointer is used as the hash value which is then mapped with a little math to the slots of the hashtable. </p>
<p>If you need some reliable order, you&#8217;ll probably want to maintain a linked list (or similar) in parallel to the hashtable. The dictionary object is basically a hashtable with a parallel maintained linked list (for order preservation). Maybe that would be of use to you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174705</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174705</link>
					<pubDate>Fri, 19 Feb 2010 07:35:22 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Joshua,</p>
<p>My hash values provided are for example RIRI FIFI LOULOU : the order of iteration can be LOULOU RIRI FIFI ; ok i understand, but if next time i provide same values again ; will it be the similar ?</p>
<p>RIRI FIFI LOULOU -> LOULOU RIRI FIFI<br />
RIRI FIFI LOULOU -> LOULOU RIRI FIFI ???<br />
FIFI LOULOU RIRI -> LOULOU RIRI FIFI ???</p>
<p>((( I don&#8217;t need reliable order, i need the opposite : the hashtab is my colony of cells, and i would like to act on randomly for every generation, with hash value as position in space ; so with same distribution, i would like different order. )))</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174706</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174706</link>
					<pubDate>Fri, 19 Feb 2010 17:08:31 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Joshua (again),</p>
<p>Sorry for my lack / error of vocabulary ; when i said hash values i mean hash keys &#8230; and to be more precise : is there only one hash function, and is the way to go through slots is always the same ? </p>
<p>Anyway, doesn&#8217;t matter, best it is doubtless that I made tests.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174707</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174707</link>
					<pubDate>Fri, 19 Feb 2010 18:15:39 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>There is one hash function, and it has regular behavior. However, it is based on the symbol pointer address, which will be essentially random between launches of the application (it&#8217;s not determined by the symbol text). As additional entries are added to the hash table, it&#8217;s essentially undetermined as to where they will be inserted.</p>
<p>So as long as you are not adding or removing entries to the hashtable, it will remain the same order every time per application launch. It will not be the same across application launches, nor through modification to the hashtable, and it will not have a logic related to the text of the symbols. </p>
<p>Hope this helps clarify a bit.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174708</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174708</link>
					<pubDate>Sat, 20 Feb 2010 11:52:44 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Joshua,</p>
<p>Thanks for clarify ; I investigated a little : here to illustrate my naive question :</p>
<pre><code>void test (t_myobject *x)
	{
		void *arg = NULL ;

		tab = (t_hashtab *)hashtab_new (0) ;

		hashtab_store (tab, gensym ("RIRI"), (t_object *)1) ;
		hashtab_store (tab, gensym ("FIFI"), (t_object *)2) ;
		hashtab_store (tab, gensym ("TOTO"), (t_object *)3) ;
		hashtab_store (tab, gensym ("MOMO"), (t_object *)4) ;
		hashtab_store (tab, gensym ("JOJO"), (t_object *)5) ;

		hashtab_funall (tab, (method)myfun, arg) ;

		hashtab_chuck (tab) ;
	}

void myfun (t_hashtab_entry *e, void *arg)
        {
       		if (e->key &#038;&#038; e->value)
			{
				post ("%ld", e->value) ;
			}
    	}</code></pre><p>Thus as expected (without relaunch) i always have same order. </p>
<p>Max console :<br />
<em><br />
32052698<br />
4<br />
5<br />
1<br />
2<br />
3<br />
</em></p>
<p>But what is 32052698 ?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174709</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174709</link>
					<pubDate>Mon, 22 Feb 2010 19:56:31 +0000</pubDate>
					<dc:creator>Joshua Kit Clayton</dc:creator>

					<description>
						<![CDATA[
						<p>Looks like another pointer has been stored in the hashtable, but obviously your code wouldn&#8217;t suggest that&#8217;s the case. So either there&#8217;s a bug in our hashtab code, or there&#8217;s some other memory corruption taking place in your object.</p>
<p>Please let us know if this persists and we can investigate further. I&#8217;d be surprised to see such a bug, since a lot of our code relies on correct functioning of the hashtab object. However, if it is present, we&#8217;d definitely like to fix it ASAP.</p>
<p>Thanks,<br />
Joshua</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174710</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174710</link>
					<pubDate>Tue, 23 Feb 2010 08:04:33 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Joshua,</p>
<p>oops, sorry, i just forget to declare t_hashtab.<br />
<em> &#8211; what an idiot ! </em></p>
<pre><code>t_hashtab *tab ;</code></pre><p>Question++ : is it safe/stupid to use LONG as hash key ?</p>
<pre><code>hashtab_store (tab, (t_symbol *)12345678, (t_object *)obj) ;</code></pre><p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174711</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174711</link>
					<pubDate>Tue, 23 Feb 2010 13:12:56 +0000</pubDate>
					<dc:creator>Timothy Place</dc:creator>

					<description>
						<![CDATA[
						<p>Yes &#8212; it&#8217;s fine.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174712</guid>
					<title><![CDATA[Re: t_hashtab and funall( ) order ?]]></title>
					<link>http://cycling74.com/forums/topic/t_hashtab-and-funall-order/#post-174712</link>
					<pubDate>Tue, 23 Feb 2010 13:26:56 +0000</pubDate>
					<dc:creator>nicolas danet</dc:creator>

					<description>
						<![CDATA[
						<p>Hello Timothy,</p>
<p>good to know &#8230;<br />
&#8230; for the next time !</p>
<p>(I finally don&#8217;t use a Hashtab) !?? </p>
<p> ;-) </p>
<p>Ciao.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

