<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Leo Susanto</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/leo_susanto/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/leo_susanto//85</id>
    <updated>2012-12-06T00:11:47Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Foswiki tip: How to hide web at the left pane</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2012/12/foswiki-tip-how-to-hide-web-at-the-left-pane.html" />
    <id>tag:blogs.perl.org,2012:/users/leo_susanto//85.4105</id>

    <published>2012-12-06T00:11:28Z</published>
    <updated>2012-12-06T00:11:47Z</updated>

    <summary>Rename the web to hide it from left pane. Say the directory is ZAdminTest, rename the folder to zAdminTest Access it using: http://host/foswiki/bin/view/Main/ZAdminTest/WebHome I am not sure if this works on *nix system though.....</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="foswiki" label="foswiki" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<p>Rename the web to hide it from left pane. Say the directory is ZAdminTest, rename the folder to zAdminTest</p>

<p>Access it using: http://host/foswiki/bin/view/Main/ZAdminTest/WebHome</p>

<p>I am not sure if this works on *nix system though.. </p>]]>
        
    </content>
</entry>

<entry>
    <title>Garbage Collection</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2012/10/garbage-collection.html" />
    <id>tag:blogs.perl.org,2012:/users/leo_susanto//85.4004</id>

    <published>2012-10-30T16:04:50Z</published>
    <updated>2012-10-30T16:06:55Z</updated>

    <summary>Garbage Collection...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="camel" label="camel" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<a href="http://www.flickr.com/photos/27057665@N04/5767283075/" title="Untitled by Hans Palmboom, on Flickr"><img src="http://farm6.staticflickr.com/5184/5767283075_0a4b2f090c.jpg" width="500" height="332" alt="Untitled"></br>Garbage Collection</a></br>]]>
        
    </content>
</entry>

<entry>
    <title>Double definition of identifiers</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2012/10/since-the-mingw-that-comes.html" />
    <id>tag:blogs.perl.org,2012:/users/leo_susanto//85.3911</id>

    <published>2012-10-03T23:48:34Z</published>
    <updated>2012-10-04T03:24:52Z</updated>

    <summary>Since the MinGW that comes with Perl 5.16.1 cpan installation is officially weird, I upgraded the Perl installation to use MinGW 4.6.2.But this comes with it&apos;s own problem, today, I tried to install DB_File and I encounter this error during...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="mingw" label="mingw" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[Since the MinGW that comes with Perl 5.16.1 cpan installation is officially weird, I upgraded the Perl installation to use MinGW 4.6.2.<br /><br />But this comes with it's own problem, today, I tried to install DB_File and I encounter this error during make process:<br /><pre>&gt; dmake
C:\CPANTE~1\PERL51~1.1\site\lib\auto\MINGW-~1.2\bin\gcc.exe -c  -IC:\CPANTesters\archives\db-4.8.30-mingw32\include\db  -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT-DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2           -DVERSION=\"1.827\"   -DXS_VERSION=\"1.827\"  "-IC:\CPANTesters\Perl5.16.1\lib\CORE"  -D_NOT_CORE  -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c
In file included from C:\CPANTesters\archives\db-4.8.30-mingw32\include\db/db.h:30:0,
                 from version.c:30:
c:\cpante~1\perl51~1.1\site\lib\auto\mingw-~1.2\bin\../lib/gcc/mingw32/4.6.2/../../../../include/pthread.h:612:3: error: expected identifier before numeric constant
dmake.exe:  Error code 129, while making 'version.o'</pre>
This is the offending code on MinGW-4.6.2/include/pthread.h.<br />
<pre>enum {
	PTHREAD_CREATE_JOINABLE       = 0,
	...
};</pre>
After a long winded troubleshooting session &amp; <a href="http://stackoverflow.com/questions/6755145/strange-objective-c-c-enum-behavior">research</a>, I found that PTHREAD_CREATE_JOINABLE has already defined in Perl\lib\CORE\thread.h. Disabling the offending line in MinGW-4.6.2/include/pthread.h fixes the problem.<br /><br /><strike>But I encounter a new dilemma, for future usage, should I disable PTHREAD_CREATE_JOINABLE definition at MinGW-4.6.2/include/pthread.h or Perl\lib\CORE\thread.h?</strike><br /><br /><strike>I am really tempted to edit Perl\lib\CORE\thread.h instead of MinGW 4.6.2 since I use MinGW to make other binaries.</strike><br /><br /><strike>Any suggestion?</strike> <br /><br />Touching Perl\lib\CORE\thread.h will bork the test, need to edit MinGW-4.6.2/include/pthread.h instead before testing.<br />]]>
        
    </content>
</entry>

<entry>
    <title>Skype is borking Foswiki on a stick</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2012/09/skype-is-borking-foswiki-on-a-stick.html" />
    <id>tag:blogs.perl.org,2012:/users/leo_susanto//85.3868</id>

    <published>2012-09-23T06:13:22Z</published>
    <updated>2012-09-23T06:28:18Z</updated>

    <summary>Lately my foswiki on the stick has been throwing this error whenever I try launch it, looking into C:\xampp\apache\logs\error.log, this comes up: (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="foswiki" label="foswiki" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="skype" label="skype" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<p>Lately my foswiki on the stick has been throwing this error whenever I try launch it, looking into C:\xampp\apache\logs\error.log, this comes up:</p>

<p>(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80<br />
no listening sockets available, shutting down<br />
Unable to open logs</p>

<p>Skipping the long winded troubleshooting narrative, I remember that I just upgraded Skype to 5.10.0.116. After shutting down Skype, I am able to bring Foswiki up again.</p>

<p>It's interesting that Skype uses port 80 to do it's business.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Compiled db-4.8.30 for MinGW64</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2012/09/compiled-db-4830-for-mingw64.html" />
    <id>tag:blogs.perl.org,2012:/users/leo_susanto//85.3857</id>

    <published>2012-09-21T00:02:09Z</published>
    <updated>2012-09-21T00:18:12Z</updated>

    <summary>Installing DB_File has been a pain, especially when binaries for db is no where to be found and instruction is rare. After spending a lot of time going through Google search result, I finally found this good instruction. The binaries...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="db_file" label="DB_File" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<p>Installing DB_File has been a pain, especially when binaries for db is no where to be found and instruction is rare. After spending a lot of time going through Google search result, I finally found this good <a href="https://bitcointalk.org/index.php?topic=45507.0">instruction</a>.</p>

<p>The binaries are available <a href="http://angrybots.com/pubd/db-4.8.30-mingw64.zip">here</a>.</p>]]>
        
    </content>
</entry>

<entry>
    <title>VS2010 Is Too Old?</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2011/06/vs2010-is-too-old.html" />
    <id>tag:blogs.perl.org,2011:/users/leo_susanto//85.1839</id>

    <published>2011-06-10T05:41:54Z</published>
    <updated>2011-06-10T05:58:17Z</updated>

    <summary>&gt; cpan Win32::Console::ANSI ANSI.xs(12) : fatal error C1189: #error : your SDK is too old... (see the README file in the distro) Fix: @Set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include @Set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    <category term="cpantesters" label="cpantesters" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<p>> cpan Win32::Console::ANSI</p>

<p>ANSI.xs(12) : fatal error C1189: #error :  <strong>your SDK is too old</strong>... (see the README file in the distro)</p>

<p>Fix:<br />
@Set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include<br />
@Set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft Visual Studio 10.0\VC\INCLUDE<br />
</p>]]>
        
    </content>
</entry>

<entry>
    <title>Installing IO::All on Win32 (no Cygwin)</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/leo_susanto/2011/06/installing-ioall-on-win32-no-cygwin.html" />
    <id>tag:blogs.perl.org,2011:/users/leo_susanto//85.1827</id>

    <published>2011-06-05T22:43:12Z</published>
    <updated>2011-06-06T03:12:54Z</updated>

    <summary>IO:All 0.41 can be installed successfully on Win32 (no Cygwin), if the test fails and spews something like this: # Failed test at t/file_spec.t line 28. # got: &apos;33&apos; # expected: &apos;34&apos; # Looks like you failed 1 test of...</summary>
    <author>
        <name>Leo Susanto</name>
        
    </author>
    
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/leo_susanto/">
        <![CDATA[<p>IO:All 0.41 can be installed successfully on Win32 (no Cygwin), if the test fails and spews something like this:</p>

<p>#   Failed test at t/file_spec.t line 28.<br />
#          got: '33'<br />
#     expected: '34'<br />
# Looks like you failed 1 test of 27.<br />
t/file_spec.t ........<br />
Dubious, test returned 1 (wstat 256, 0x100)<br />
Failed 1/27 subtests</p>

<p>The alternatives:<ul><li>fix your %PATH% of more than one partition character (';')</li><li>fix t/file_spec.t</li></ul></p>]]>
        
    </content>
</entry>

</feed>
