swestrup: (Default)
I'm about to geek out here on how to retain logarithmicly distributed samples in a sparse array as part of a linear sampling process. If that sentence means nothing to you, or if you couldn't care less about that subject, don't bother to click.

Computer Geek Contents )

Okay. Geek content is finished. You may look again.
swestrup: (Default)
I would say that the inner workings of Perl were grotty, were it not that I know of many nice grottos far less grotty than perlguts.

So, my discovery of today is that the following code works:

eval{ use Foo::Bar }
eval{ use Foo::Bar } if $@;
eval{ use Foo::Bar } if $@;
die $@ if $@;

But this doesn't:

sub tryit($) { for(1..3){ eval $_[0]; return 1 if !$@ } die $@; }
tryit("use Foo::Bar");

Or, that is, it claims to work, but the exports of Foo::Bar are nowhere to be found...

Anyway, I finally realized I only called tryit 6 times in my code so I simply pasted in 6 copies of the first solution. One day I'll figure out what I SHOULD have coded, when I'm not under such deadline pressure.

Oh, and the above is necessary since, under Win98, if I fork two perl tasks and they load the SAME libraries, then every now and again one of the loads fails for no reason. Retrying twice seems to limit the scope of the problem. FIXING the problem is left as an excercise for the reader.

Yay me!

Jun. 18th, 2003 01:18 am
swestrup: (Default)
I'm beginning to feel that I'm on top of this whole fsking worldcon website project. I have, if not mastered http, html, javascript, CSS1-2, cgi, perl and dtd, and least gotten to the point that they are familiar and I have a good idea of what it is I'm doing.

I also managed (with more than a little difficulty) to summon up the courage to phone up the people at mci and ask why my scripts weren't running. Not only did I manage to get a coherent and reasonable answer, but I was given a propper developers account and everything, so that I have offical people to talk to if something goes wrong.

So, 98% of the code is written. Everything, in fact, except for the final crucial last step of actually producing the output that is the whole reason behind this project. I have one day left before we go live and, I figure, about 1/2 days work left.

I actually feel like I'm on top of things. Come the weekend though, I'm gonna wanna REST.
swestrup: (Default)

The incantation is:

my $p = new XML::Parser(Style => 'tree')

and NOT

my $p = new XML::Parser(Style => 'Tree')

as the docs would have one believe! So, that took MUCH longer than it should have, but now I have an XML parser.

Now updated to correct typos.


Jun. 3rd, 2003 04:06 pm
swestrup: (Default)
So, this time [livejournal.com profile] _sps_ was NOT exactly correct, and he needs to apologize. I asked him to write a little XML parser for me on the weekend, and he threw something together from the XML::Parser Perl library I had, saw that it produced nothing, and told me that my library or interface to it was broken. I've now download and tested half-a-dozen examples of uses of this exact same library, and they work as advertised.

So, now I'm gonna have to read the docs and find out why the library didn't work as expected, and will have to do the work myself. Harrumph!

But at least I get to feel smug about catching [livejournal.com profile] _sps_ in an overt error. I don't get to do that very often.

January 2017



RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 26th, 2017 06:00 pm
Powered by Dreamwidth Studios