speters's Journal http://use.perl.org/~speters/journal/ speters's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:17:58+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 speters's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~speters/journal/ [Perl 6 Microgrant] C++ compiler support nearly there http://use.perl.org/~speters/journal/33405?from=rss <p>Finally, after a nasty month of recitals, concerts, final exams, term papers, Katori Shinto Ryu seminars, and basement remodeling, my work output on Parrot is starting to pick up. I sent off a patch about an hour ago to get Parrot to compile with g++ through to the imcc code. Time permitting, I should have it the rest of the way by the end of the weekend. I'm really hoping that this added strictness will help to get Parrot compiling with Borland C++, which is a much more strict compiler than gcc is.</p> speters 2007-06-02T00:59:34+00:00 journal [Perl 6 Microgrant] Hmmm...Missing journal entry http://use.perl.org/~speters/journal/33401?from=rss <p>An EBKAC must have happened because it looks like a couple entries are missing.</p> speters 2007-06-01T13:54:07+00:00 journal [Perl 6 Microgrant] Tuits http://use.perl.org/~speters/journal/33234?from=rss <p>Sorry, no real news here. End of school year means available time is being sucked up by running the children to concerts, recitals, soccer games, and so on. My wife is enjoying working on final papers, studying for exams, and art projects. At the same time, I'm nearly finished with my basement.</p><p>Perl 5 has occupied my time as well with me finally completing an old bug fix and updating new modules. My side projects of trying to test CPAN with bleadperl and creating TODO tests for the existing Perl bugs have been cutting into my tuit supply as well.</p><p>Fortunately, my tuits should increase towards the end of next week. In the mean time, don't expect any major changes, but I should have a trickle of changes starting in the next day or so.</p> speters 2007-05-09T19:48:32+00:00 journal [Perl 6 Microgrant] Quietly building http://use.perl.org/~speters/journal/33183?from=rss <p>I've been somewhat quiet since my last update. A weekend of nice weather filled my schedule with yard work. That doesn't mean things have been at a complete shutdown.</p><p>Shortly after completing building Parrot with Intel C++, I tried my first <code>make -j</code>. It wasn't the complete failure I expected, but Parrot didn't build either. Obviously, there's a dependency problem somewhere. I'm also realizing that the Parrot makefile is a lot less structured than Perl's and things that normally build after miniparrot seem to be built before the ops files are converted to C. Its time to throw Parrot on a computer with many more CPUs to see how much damage I can do.</p><p>Borland C++ has been a bit more frustrating. Hoping to see that my patches have helped, instead Borland C++ is unable to make it past compiling the ops files. Using dmake has been as much of a failure, but it seemed to produce some useful error messages now, so there is still hope.</p><p>Sun Studio on Linux is somewhat on hold for me while I wait to see when the release of Sun Studio 12 happens. I'm hoping some bugs I see go away with the release, similarly to the problems I disovered in the Sun Studio 12 beta by trying to compile a threaded Perl.</p><p>On other fronts, I'm going to try to upgrade my OpenBSD VM to 4.1 sometime this week. I've found new problems with Perl with every OpenBSD release, so I'm interested in seeing how Parrot fares.</p> speters 2007-05-03T01:29:36+00:00 journal [Perl 6 Microgrant] Intel C++ http://use.perl.org/~speters/journal/33128?from=rss <p>I've gotten one milestone for the grant completed today with <a href="http://smoke.parrotcode.org/smoke/parrot-smoke-0.4.11-devel-r18345-unknown--i386-linux-icc-default--1177699533-800--6798-6788-10-253-599-0--2d443430202d2d67632d6465627567--41c3d5245f78ee5b9ab06001275437d7.html">a completed Intel C++ compile and test on Linux</a>. Patches should be on their way shortly.</p> speters 2007-04-27T19:12:37+00:00 journal [Perl 6 Microgrant] C++ Cleanup Adjustments http://use.perl.org/~speters/journal/33122?from=rss <p>The other night, I sent in a large patch to cleanup some additional implicit void pointer casts that C++ simply cannot live with. <a href="http://use.perl.org/~particle">particle</a> gave me a great idea on IRC, however, for cleaning up some of the redundancy of one set of cleanups with a macro. So, its time to re-patch with some additional cleanups for good measure. More on this patch later today.</p> speters 2007-04-27T12:56:48+00:00 journal [Perl 6 Microgrant] Parrot/C++ keyword collision cleanup http://use.perl.org/~speters/journal/33068?from=rss <p>The C++ keyword cleanup of Parrot was completed last week with some help from Mark Glines and his working "make splint" on Parrot. I'm working now one some changes to Parrot::Ops2c::Utils that will move some struct and function declarations out to header files rather than in <code>src/ops/core_ops.c</code>. The current structure is cause C++ some problems and the refactoring should help things out.</p><p>Other than that, I've made a few other cleanups throughout Parrot last week, ranging from silencing a few warnings on OpenBSD to giving <code>STRING.strstart</code> an actual type other than being yet another Parrot void pointer.</p><p>The work on C++ has been taking me much longer than I thought, but, hopefully, this work will help clean up the Parrot code a bit more, make it a bit more portable, and, hopefully, actually allow someone to make good use of what I've been doing.</p> speters 2007-04-22T21:56:21+00:00 journal [Perl 6 Microgrant] De-class-ifing Parrot http://use.perl.org/~speters/journal/32998?from=rss <p>The work on changing variables called <code>class</code> to something else in Parrot continues. I have a rather large patch ready to let loose after the release this Tuesday. I also found a couple of files with variables named <code>this</code>, but the PMC method <code>namespace()</code> is my newest bit of pain.</p> speters 2007-04-15T20:19:19+00:00 journal [Perl 6 Microgrant] The great variable renaming http://use.perl.org/~speters/journal/32943?from=rss <p>Yesterday, I sent in <a href="http://www.nntp.perl.org/group/perl.perl6.internals/2007/04/msg37439.html">a patch</a> that appears to clean up the last bits necessary to get Intel C++ to compile. One big problem for C++ compiles.</p><p> <code> vtable-&gt;class<nobr> <wbr></nobr>... </code> </p><p>Yes, that's right. A variable named class. C++ <em>really</em> doesn't like that very much. I would have thought that would have been something that <code>-Wc++-compat</code> would have caught, but obviously it didn't. I'm looking at </p><p> <code> vtable-&gt;pmc_class<nobr> <wbr></nobr>... </code> </p><p>as a possible replacement, but I should mail the p6i list on that change.</p><p>With all the cleanup, though, the problems with linking a workable Parrot became clear. The guessed platform seems to be messed up with Intel C++ causing defines to be incorrect for src/platform.c. I should have this sorted out early this week.</p> speters 2007-04-09T13:05:21+00:00 journal [Perl 6 Microgrant] Sick http://use.perl.org/~speters/journal/32922?from=rss <p>I've been beaten by a bad cold the past few days, but I'm finally getting to the point of feeling better. Cleanup has been going slowly while chasing down unexpected test successes on Fedora, that have been failing everywhere else. Here's a few things I'm looking at right now.</p><ul> <li>The makefile produced by configure is not compatible with dmake, making work with Borland C++ difficult. I'll see if I can't find a way around this besides using Borland's exceptionally featureless make.</li><li>I've downloaded a new version of Intel C++. I need to play with this further to get Parrot compiling correctly here.</li><li>I need to get some scheduled smokes started.</li></ul> speters 2007-04-06T01:11:09+00:00 journal [Perl 6 Microgrant] Parrot compiling on C-64 http://use.perl.org/~speters/journal/32874?from=rss <p>I pretty much had to pull an all-nighter, but I finally got Parrot compiling and testing perfectly on my C-64. I'm guessing some people thought it was an "Impossible Mission", but I have that "M.U.L.E." off my back.</p> speters 2007-04-01T19:26:32+00:00 journal [Perl 6 Microgrant] Week 1 ending status http://use.perl.org/~speters/journal/32862?from=rss <p>The majority of this week has been to start understanding the lay of the land in the Parrot world. The first real obstacle seems to be the regular use of <code>void</code> pointers throughtout the code base. This can make the code difficult to understand since you don't really know what's coming. It also has the nasty side effect of preventing a true C++ compiler from compiling Parrot.</p><p>So, to begin, I created the following patches to begin the cleanup.</p><ul> <li>RT #42107 [PATCH] Intel C++ is not gcc</li><li>RT #42110 [PATCH] Returning values from void functions</li><li>RT #42151 [PATCH] Assorted casting cleanups - part I</li><li>RT #42156 [PATCH] Make invoke() return opcode_t*</li></ul><p>All of the above were applied, although RT #42156 required some re-work on my part.</p><p>I also dug up the warnocked "RT #41837 [PATCH] integer overflow in include/parrot/sub.h" that had been submitted some time ago. It fixes some integer overflow issues that the Sun compilers on Solaris x86 complain loudly about.</p><p>For the upcoming week, I see the cleanup of void pointers continuing. I'm also looking into compiling on Borland C++ on Windows. Borland can be much more strict than other compilers causing it to choke on things other compilers let past. I should have an additional patch to help me out with Borland C++ tonight. I also need to take a look at the segmentation faults I'm seeing when I test Parrot on Solaris. I also need to test a couple of changes on HP-UX PA-RISC as well. Finally, there have been some reported success of compiling Parrot on Cygwin. I just need to work on those successes so that you don't have to be a regular on #parrot to compile successfully.</p> speters 2007-04-01T00:32:13+00:00 journal [Perl 6 Microgrant] First steps http://use.perl.org/~speters/journal/32803?from=rss <p>So, now <a href="http://www.nntp.perl.org/group/perl.perl6.internals/2007/03/msg37121.html">it's official</a>. Time to go to work.</p><p>The first thing I want to look at is Intel C++ support for Parrot. I have to take this on somewhat carefully for a few reasons.</p><ul> <li>Like gcc, Intel C++ spans multiple operating systems including Windows and Mac OS X.</li><li>Compiler flags differ depending on the OS.</li><li>Most annoyingly, Intel C++ tries to look like gcc, but isn't anywhere near compatible.</li><li> <a href="http://groups-beta.google.com/group/comp.lang.perl.misc/msg/b2f911d6d9c5cef2">Advice from Klortho</a> #11912 applies to icc's math capabilities</li></ul><p>I need to look Parrot's current processes for identifying Intel C++ so we do not have to repeat the logic for each operating system hint file where Intel C++ is supported. My thoughts now are to identify Intel C++ earlier in the Parrot configuration chain, but I haven't decided yet whether this should be when we check for gcc, or if this check should be done separately.</p> speters 2007-03-26T20:15:23+00:00 perl6 MadMongers Wednesday! http://use.perl.org/~speters/journal/30505?from=rss <p> <a href="http://www.madmongers.org/meetings">MadMongers</a>, the Madison, WI, Perl Mongers group will be holding its first meeting tomorrow night. Please, come and join us to help get the group kicked off, or just come to have a <a href="http://www.greatdanepub.com/beer.php">beer</a> and talk with a bunch of other Perl programmers. See you there!</p> speters 2006-08-02T02:24:29+00:00 journal Playing with fire http://use.perl.org/~speters/journal/29307?from=rss <p>I&#8217;ve been lucky enough to recently get access to the <a href="http://log.perl.org/2006/03/not_the_termina.html">Sun Fire T2000</a> that <a href="http://use.perl.org/~ask">Ask</a> and <a href="http://use.perl.org/~Robrt">Robert</a> have gotten from the Sun Test Drive program. I have to say that so far it has been quite fun to play with.</p><p>The architecture of the new UltraSparc chips is quite interesting. You can check out the <a href="ahref=">OpenSparc website</a> if you are really interested, but it allows each CPU to run four separate, autonomous threads, or strands, as Sun calls them. Because of this, an 8 CPU box, like the perl.org T2000, behaves like a 32 CPU box. I have to say that running <code>gmake &#8211;j33</code> when developing Perl is a real time saver.</p><p>More importantly, of course, is that it has helped us to close out a few old bugs as well as help us find a few new ones. <a href="http://use.perl.org/~Nicholas">Nicholas</a> fixed some parallel build issues that prevented the gmake gymnastics above. He is also playing with parallel testing with harness in the Perl distribution. With multiple CPU cores becoming more common (I&#8217;m expecting to see a good number of MacBooks at YAPC::NA) this will be helpful to a lot of Perl developers.</p><p>The new bugs involved a couple of additional build issues. First, Perl&#8217;s tests were making the assumption that the UNIX init proc had a pid of 1. That&#8217;s not necessarily the case on the T2000. Second, I found that the make used to build some of core modules switched from gmake to Sun make. This isn&#8217;t very helpful when you are trying to use gmake&#8217;s parallel make capabilities. I&#8217;ve got a patch that Nicholas suggested to fix this. Now, I just need to complete testing on before I commit it into the core.</p><p>Now, that we&#8217;ve kind of broken it in, I&#8217;m going to try to do some benchmarking on the box to try a few comparisons that have popped up on the perl5-porters mailing list in the recent past. One interesting one that Jim Cromie discussed was using Perlbench to compare multiple runs of a single Perl against itself. The idea is that Perl should perform with some regular consistency. One that I&#8217;m interested is comparing the performance of a big 16 CPU Itanium box against the T2000&#8217;s 8 CPUs that behave like 32 CPUs. I really want to see how the virtual CPUs compare against the real thing. Finally, I&#8217;m hoping that this platform will help point out the poor performing places in the Perl core so that I can help speed up Perl a bit in a few places. Hopefully, I won&#8217;t need a crash course in Sparc Assembly Language to do this.<nobr> <wbr></nobr>:)</p> speters 2006-04-13T03:06:43+00:00 journal The Cat That Ate Tuits http://use.perl.org/~speters/journal/27831?from=rss <p>I was going to post <a href="http://www.flickr.com/photos/21684912@N00/69192836/"> this picture</a> as a response to the <a href="http://www.flickr.com/photos/hfb/56871376/">dog who ate tuits</a>. Unfortunately, Simba (the cat) has decided to eat tuits in a very bad way. Two evenings ago, he somehow got out of the house, and has disappeared. Being an inside cat all of his life, sneaking out is never a good thing. With Winter now here with snow and near zero F wind-chills, this has been made a lot worse. My hope right now is that he is in someone's garage and just hasn't had the chance to escape yet. I'll stick with that for now.</p><p> <strong>Update:</strong> Simba was found under a bush a block away from our house by a woman who was putting up her Christmas lights. I'll have to find out which house, since I thought I had looked through every pine tree and bush in a couple block range.</p> speters 2005-12-02T11:52:19+00:00 journal America's pastime? http://use.perl.org/~speters/journal/25670?from=rss I noticed <a href="http://www.flickr.com/photos/21684912@N00/25603869/">an unusual visitor</a> at Saturday's White Sox game. Take a good look at the top right corner. speters 2005-07-13T03:00:41+00:00 journal Perl Onion logo http://use.perl.org/~speters/journal/23259?from=rss <p>Somewhere in the recent past, the perl.org sites switched to using an Onion logo, like this <a href="http://www.perl.org/simages/onion/onion-30x30a.gif">one</a>.</p><p>Unfortunately, I haven't seen anything about the switch to these logos, any guidelines for use, or even what logos are available. It'd be great to have some of these questions answered somewhere.</p> speters 2005-02-19T18:17:15+00:00 journal Reserved for future use http://use.perl.org/~speters/journal/17755?from=rss I have seen this in so many languages and systems for either keywords, table names, and class names. I have yet to see something reserved that was actually implemented though. speters 2004-03-04T18:48:24+00:00 journal RFC - Test::Reference http://use.perl.org/~speters/journal/17672?from=rss <tt>Either the Perl-QA mailing list is down, or it just doesn't like where I'm sending my mail from, because my emails just don't seem to the making the list.&nbsp; Well, not seeing an obvious Test:: module that would work for me to make sure<br>that two references referred to the same thing, I wrote my own module.<br>Before sending it off to CPAN, I'd like to see what you all think of it.<br>Also, I have a couple of questions.&nbsp; First, the module includes some XS,<br>which is unusual for Test:: modules.&nbsp; Do you think I should split my code<br>into two modules (say Devel::References::Same and Test::References) or keep<br>it the way it is.&nbsp; Second, I'm not particularly in love with the names<br>Test::Reference with the function "references_same".&nbsp; I was thinking of<br>Test::References::Same as a possible name for the module, but then I at a<br>loss of what to call the function.&nbsp; references_same_ok?&nbsp; I'd appreciate your<br>thoughts.<br><br>NAME<br>&nbsp; &nbsp; &nbsp; &nbsp;Test::Reference - Check to see if two references refer to the same<br>&nbsp; &nbsp; &nbsp; &nbsp;variable<br><br>SYNOPSIS<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;use Test::Reference;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $val1 = 5;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $val2 = 5;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $a = \$val1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $b = \$val1;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $c = \$val2;<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;references_same($a, $b, "Will return ok");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;references_same($a, $c, "Will return not ok");<br><br>DESCRIPTION<br>&nbsp; &nbsp; &nbsp; &nbsp;This modules allows you to test to see if two references refer to the<br>&nbsp; &nbsp; &nbsp; &nbsp;same variable or not.<br><br>FUNCTIONS<br>&nbsp; &nbsp; &nbsp; &nbsp;"references_same( $ref1, $ref2, $mesg)"<br><br>&nbsp; &nbsp; &nbsp; &nbsp;Checks to see that the two references are references and that they both<br>&nbsp; &nbsp; &nbsp; &nbsp;refer to the same underlying variable.<br><br>SEE ALSO<br>&nbsp; &nbsp; &nbsp; &nbsp;Extending and Embedding Perl - my main reference for learning XS<br><br>&nbsp; &nbsp; &nbsp; &nbsp;Devel::Peek - my other main reference for learing XS<br><br>AUTHOR<br>&nbsp; &nbsp; &nbsp; &nbsp;Steve Peters, &lt;steve@XXXXXXXXXXX.XXX&gt;<br><br>COPYRIGHT AND LICENSE<br>&nbsp; &nbsp; &nbsp; &nbsp;Copyright (C) 2004 by Steve Peters<br><br>&nbsp; &nbsp; &nbsp; &nbsp;This library is free software; you can redistribute it and/or modify it<br>&nbsp; &nbsp; &nbsp; &nbsp;under the same terms as Perl itself, either Perl version 5.8.3 or, at<br>&nbsp; &nbsp; &nbsp; &nbsp;your option, any later version of Perl 5 you may have available.<br></tt> speters 2004-02-28T14:50:33+00:00 journal Piers proudly pounds "P" pattern http://use.perl.org/~speters/journal/10868?from=rss <p>My name <a href="http://www.perl.com/pub/a/2003/03/p6pdigest/20030302.html#psteve_peters'_patches_prevent_parrot_peeves">mangled</a>, all in the name of alliteration.</p> speters 2003-03-03T21:21:22+00:00 journal Google Bork, bork, bork! http://use.perl.org/~speters/journal/10582?from=rss This is so funny. You all have to take a look at this. It's <a href="http://www.google.com/intl/xx-bork/">Google from the Swedish Chef's perspective</a>. speters 2003-02-14T16:24:24+00:00 journal