Older blog entries for wainstead (starting at number 93)

Waverous-to-Stunt patching procedes

I'm making progress patching my fork of Stunt LambdaMOO by generating patches from the git log of Waverous LambdaMOO. There have been the occasional rejections by patch that have puzzled me a bit; I wonder if it's a white space problem? I doubt it. I didn't look terribly close because doing the edits by hand only took a minute. I'm now up against the dreaded TRY/EXCEPT/ENDTRY set of C preprocessor macros. By my commit log in Waverous:


commit c7b9cf521033fa816fbe650c8d00c720e453cfdf
Author: Steve Wainstead
Date: Sun Jun 7 19:28:43 2009 +0000

Replaced the TRY, CATCH and ENDTRY macros with their respective
code bodies to solve a void pointer problem.

server/db_file.c | 150 ++++++++++++++++++++++++++++++++++++------------------
1 file changed, 101 insertions(+), 49 deletions(-)
Geez, that was three years ago? I was hacking away in my little second-bedroom-turned-office in Jackson Heights, Queens; and these days I'm in a high rise in downtown Las Vegas.

Anyway this patch was completely rejected. It's late and my brain is too short on glucose to get the job done. Time to push to master and try to catch up on MOO-talk again. I can't keep up with it lately!

Syndicated 2012-06-20 06:10:00 (Updated 2012-06-20 06:11:44) from Wainstead

15 Jun 2012 (updated 9 Jul 2012 at 18:09 UTC) »

Hacking Waverous changes into Stunt

A few months ago Todd Sundsted, the owner/developer of the Stunt LambdaMOO server code, emailed me inquiring about the effort it took to get LambdaMOO to compile as C++. I ventured it would be interesting to try to apply my changes in Waverous LambdaMOO to a branch of Stunt LambdaMOO. A month or so ago I did fork Stunt on Github and made a local clone. I then looked at the git log of Waverous and chose my first commit that converted some of the files from C to C++. Applying that as a patch to Stunt was about, I'd say, 65% successful: some of the hunks applied, some failed and gave me .rej files.


patching file ast.c
Hunk #9 succeeded at 209 (offset 11 lines).
Hunk #10 succeeded at 220 (offset 11 lines).
Hunk #11 succeeded at 344 (offset 29 lines).
Hunk #12 succeeded at 413 (offset 29 lines).
patching file ast.h
Hunk #1 succeeded at 83 (offset 7 lines).
Hunk #2 succeeded at 112 with fuzz 2 (offset 9 lines).
Hunk #3 succeeded at 190 (offset 11 lines).
patching file db.h
Hunk #1 succeeded at 298 (offset 62 lines).
patching file exceptions.h
Hunk #6 FAILED at 159.
Hunk #7 succeeded at 182 (offset 3 lines).
1 out of 7 hunks FAILED -- saving rejects to file exceptions.h.rej
patching file execute.h
Hunk #1 FAILED at 46.
Hunk #2 FAILED at 94.
2 out of 2 hunks FAILED -- saving rejects to file execute.h.rej
I didn't have oodles of time so I let it slide for a few weeks... my time was being taken up by a Udacity course, running LVDev, campaigning for a political candidate, working on a GreenerBlocks.org project and more! But the itch is there and wants scratching. Tonight I packed my laptop and went over to the Vegas Jelly in /usr/lib above The Beat Coffeehouse. It meets every Thursday night. The Linux, Bitcoin and All Things Open Source group was meeting in the conference room (Hi, Julian!) and I took a seat in the back of the room. I worked while a debate raged about the prospects of Bitcoin but I barely took notice. What I first found was gcc, make and friends were not present on my system anymore. I upgraded my laptop to OS X Lion recently when I participated in an iOS Boot Camp. But I installed XCode; wtf? Googling told me I needed to install the command line tools via Preferences -> Downloads. Completely obvious in retrospect, heh. I renamed configure.in to configure.ac, copied my Waverous version of the file over it and ran autoconf. All good. I ran ./configure:

bash-3.2$ ./configure
checking for bison... bison -y
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."
Another wtf moment. I googled around but didn't really find anything specific enough for my situation; maybe upgrading the autotools? I did port update on autoconf and automake; but still the same error. Finally I just copied install-sh from the automake directory; this is scratch hacking after all, and with version control you never have to say you're sorry. (EDIT: Duh, I forgot to run automake --install-missing, was all).

bash-3.2$ ./configure
checking for bison... bison -y
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking how to run the C preprocessor... gcc -g -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for strftime... yes
checking for gcc -g option to accept ISO C99... unsupported
checking for gcc -g option to accept ISO C89... (cached) none needed
checking for gcc -g option to accept ISO Standard C... (cached) none needed
checking sys/bsdtypes.h usability... no
checking sys/bsdtypes.h presence... no
checking for sys/bsdtypes.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for memory.h... (cached) yes
checking for pid_t... yes
checking for mode_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
./configure: line 4810: syntax error near unexpected token `sqrt,'
./configure: line 4810: `MOO_HAVE_FUNC_LIBS(sqrt, -lm /lib/libm.a "-static -lm")'
OK, more wtf material... I called it an evening, had a nice discussion with a couple of the Linux guys about LambdaMOO and the problems of getting the masses to use new software, and headed home.

Back in my home office I googled the error a bit, editing out the particulars of the error message to make the search query more generic; somewhere I found one forum post where the reply was "Your aclocal got borked." Ah! Did I not move some of the MOO m4 macros to another file to reduce the size/complexity of configure.ac?

Indeed I did, and I left a helpful log entry in git to that effect.

So I copied acinclude.m4 over from the Waverous project, ran aclocal, ran autoconf and finally ./configure and everything went well. I now have a Makefile that will correctly call g++ for the project. Time to commit my work, push it to github and sleep on it a bit.

What comes next, should I undertake it, is a lot of bare knuckle hacking to resolve conflicts between Waverous's code base and Stunt's. Todd has made a lot of edits to the C sources, I'm sure, and I started from the most recent version of LambdaMOO on Sourceforge. It means I'll have to come to understand a lot of the changes Todd made, and that will be challenging.

Syndicated 2012-06-15 06:21:00 (Updated 2012-07-09 18:03:16) from Wainstead

Package manager/code sharing for MOO code

Todd Sundsted has been doing some amazing work with his fork of LambdaMOO, Stunt. While I was trying to catch up on the MOO-Talk discussion list (which has been very busy as of late!) he announced Composed, a package manager he wrote and has been using for two years. Check it out! He even has a call to action for people to package their MOO code for release. Imagine one ANSI package to rule them all.

Syndicated 2012-05-06 19:45:00 (Updated 2012-05-06 19:45:33) from Wainstead

"Object frameworks and object browsers are not a substitute for good design or documentation, but they often get treated as one. Too many layers destroy transparency: It becomes too difficult to see down through them and mentally model what the code is actually doing."

-- Eric Raymond, "The Art of Unix Programming."
25 Mar 2012 (updated 25 Mar 2012 at 08:11 UTC) »

Let not a month go by without some work on thine open source project...

I closed a ticket today, a very minor one: the programmer's manual, which is a Texinfo document wasn't building on my Fedora 14 system on an Intel Mac Mini.Some months ago I decided to upgrade the Mini to Fedora 16 and that was the end of the Mini. Long story short: Fedora switched to the GRUB2 boot loader and after the distro is installed on the Mini it won't reboot. GRUB2 couldn't find the kernel, even when I explicitly passed the path on boot.The Mini has a flaky CDROM drive so installing anything means trying over and over until the installation process survives with no bad reads from the DVD disc. I should just pry the Mini open at this point and install a new optical drive.Tonight while doing another task (several, really) I kept trying to reinstall FC on the Mini, and the sixth or seventh try went without a hitch. Finally. I started "yum groupinstall"ing things to get the system fleshed out with the tools I need. It's almost there now.So I git cloned Waverous off Google Code and got the manual to build. Finally! It's not much but at least that's one ticket closed and the project inches forward. I still wanna try branching and doing a radical rewrite of the structs into classes just for kicks.

Syndicated 2012-03-25 07:10:00 (Updated 2012-03-25 07:14:58) from Wainstead

Long delay in doing anything

I'm posting to say I haven't gone away, nor plans for Waverous... I am still planning on releasing File I/O in a newly patched form for the MOO community.I'm also keen on doing some serious experimentation with Waverous by doing wholesale changes from C to C++, just to see what happens.I've been super busy here in Las Vegas running the Python Programmers Meetup and attending many other meetups, especially the Las Vegas Jellies. The weekly Jelly happens right down the street from me and has exploded with activity.

Syndicated 2012-02-24 00:45:00 (Updated 2012-02-24 00:45:16) from Wainstead

GammaMOO and Stunt LambdaMOO project plugs

I've recently done some testing for GammaMOO, which has restarted development. It's really exciting to see LambdaMOO development happening again.Check out Luke's GammaMOO project!The other ongoing fork of LambdaMOO is Todd Sundsted's Stunt which adds multiple inheritance to the Moo scripting language. Also worth checking out! Or cloning, as be the case.

Syndicated 2012-01-03 04:58:00 (Updated 2012-01-03 04:58:34) from Wainstead

What I'd like to see for LambdaMOO

On the MOO-talk mailing list, the question was posed: What other things are missing from the MOO server?My answer: users. And usability. And hackers.

Syndicated 2011-12-02 05:41:00 (Updated 2011-12-02 05:43:22) from Wainstead

Waverous is now using Git

I finally sat down, rolled up my sleeves and converted Waverous to a Git repository on Google Code. There were a few things that needed extra attention:

1) I used John Albin's instructions on converting a Subversion repository to Git. It provided the most complete way of doing it.I had to do some detective work to figure out the names and emails of some previous committers, but in the end I had a repository with all the data I wanted including all branches and tags.

2) Getting all branches to the remote was not obvious, so I just did some rectangle editing in Emacs:


git checkout AUTOCONF_TWO
git checkout CONSTANTS
git checkout FLOATSUSPEND
git checkout HEAD -> origin/master
git checkout INLINEPC
git checkout UNSAFE_OPTS
git checkout WAIF
git checkout WROGUE
git checkout avalon181
git checkout demacrofication
git checkout demacrofication@233
git checkout experimental_automake
git checkout experimental_reorg
git checkout master
git checkout pavel
3) Then I pushed everything to Google Code:

git push googlecode --all
4) I found the tags didn't make it up either. This was another step:

git push --tags
The one thing I don't like, so far, is I have to maintain a .netrc file with my Google Code password, and when I git clone the repository I have to edit out my username@ from the URL. But after that everything seems to work fine, though git push just returns "Repository up-to-date" without telling me anything happened.So, from the top:

# clone repository created from John Albin's instructions
git clone ~/new-bare.git waverous

# add the new remote per Google's instructions
git remote add googlecode https://code.google.com/p/waverous

# check out all branches from my local repository
git checkout AUTOCONF_TWO
git checkout CONSTANTS
git checkout FLOATSUSPEND
git checkout HEAD -> origin/master
git checkout INLINEPC
git checkout UNSAFE_OPTS
git checkout WAIF
git checkout WROGUE
git checkout avalon181
git checkout demacrofication
git checkout demacrofication@233
git checkout experimental_automake
git checkout experimental_reorg
git checkout master
git checkout pavel

# push all branches to Google Code
git push googlecode --all

# push all tags to Google Code
git push --tags

# Clone and push the wiki on Google Code as a new Git repository
git clone https://code.google.com/p/waverous.wiki
cd waverous.wiki
svn export --force http://waverous.googlecode.com/svn/wiki .
git add .
git commit -m "Conversion of Waverous's wiki documentation to Git."
git push origin master
Overall this was a dumb brute force approach, but it got everything done.

Syndicated 2011-09-03 19:30:00 (Updated 2011-09-03 19:30:33) from Wainstead

technorati claim post (ignore)

84VBNE7QDC98
this is to satisfy technorati that I own this blog

Syndicated 2011-08-24 13:52:00 (Updated 2011-08-24 13:52:06) from Wainstead

84 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!