Thursday, March 12, 2015

Waverous finally moves to GitHub

What with the imminent demise of Google Code (has it been around that long already?), it was finally time to move Waverous over to GitHub. Henceforth:

https://github.com/wainstead/waverous

Saturday, October 12, 2013

Wandering around the Stunt ecosystem and GitHub

I've spent some time today compiling Stunt, trying out Improvise and looking at my fork of Stunt on GitHub. Been a long time!

I had little luck playing with the console one gets via Improvise (think: a terminal emulator in the browser), but it was cool nonetheless. The experience was much like loading the Minimal.db that comes with the original LambdaMOO server code: pretty much anything you type ends in a cryptic error.

Reading more documentation cleared things up a bit. I've half a notion to build out a personal website based off of Stunt and Improvise. My recent thinking is to plunge into the Indie Web movement a bit and run a personal site: first, as a WordPress site (just to get going) and then perhaps rolling my own CMS using Node.js or Django.

(The ideation phase is always the most fun, when all things are possible and sound really cool in your head).

But the possibly-meaningless thought of "making a personal web site that is programmable by any user" has the weird appeal of the pre-Cloud days of the Web, and even the weirdness of the pre-World Wide Web days of the Internet. (LambdaMOO was born roughly the same time as the web).

Well, much to think about. I'd like to see Stunt become widely available via various package management systems (Fedora, MacPorts, etc).

Oh, I should note here I've moved to Key West, Florida. This came about after, one day in May, I was looking at the classified ads in the online edition of The Citizen, Key West's local paper. There was a job listed in Help Wanted that was perfect for my wife: Director of Development for the Key West Art and Historical Society. I teasingly sent the ad to her, she applied for it just to show me up, and landed the job. So in short order we moved from Las Vegas to Key West.

This spells the end of my technology-scene-building days for a while. Vegas was a tabula rasa as far as tech scenes go, so I plunged myself into every tech Meetup there was and started one of my own (Las Vegas Developers Meetup, for any software developer regardless of technology). I also cofounded the first Vegas GiveCamp, a weekend hackathon for charity.

But since at least the middle of this year I've longed to get back into open source development. Probably longer. I think the free time is now there to finally finish work on Automake and roll some Linux distro packages. 

Saturday, June 22, 2013

Stunt is now C++

Over at Stunt.io, Todd Sundsted has released the C++ version of Stunt, his fork of the LambdaMOO server.

Much of my Waverous LambdaMOO went into it, even if not directly: Todd had done so much work on the multiple-inheritance addition to the MOO scripting language that my branch was too far out of sync with the mainline to be merged... but Todd used my branch as a guide.

See the announcment on the MOO-talk mailing list!

Wednesday, June 5, 2013

Long hot summer

I have nothing new regarding the project. I've been super busy running LVDev, participating in the National Day of Civic Hacking (I won the category "Best Civic Hack"), and organizing the first Las Vegas GiveCamp.

Lately I've been longing to plunge into more open source work though!

Sunday, December 9, 2012

Waverous patches soon to be integrated into Stunt

I saw a wonderful message from Todd Sundsted this weekend on the MOO-Talk list:
Next up, I'm going to start integrating Steve Wainstead's C++ patches into Stunt. This will give us better tools for abstracting away some of the complexity in the current codebase.
I haven't been doing anything with Waverous for months now and this is a shot in the arm. In part I took a deep dive into Minecraft and spent a lot of time on it -- a few hundred hours of playing time.

This was a direct result of reading Jane McGonigal's "Reality Is Broken: Why Games Make Us Better and How They Can Change the World." I never knew all those years of playing Grand Theft Auto were making me happier and mentally healthier. I sold my PS3 a couple of years ago and decided I wouldn't sink any more time into gameplay. When my wife took a four day trip to New Orleans I decided to spend the alone-time in a new immersive experience. I loved every minute of it.

This is related peripherally to LambdaMOO development work in that some people still use MOOs to create and play games. The MOO I reside on does not do this, but one of the projects I want to pursue is use the package management system of Stunt to create some rooms and objects... I think prefabricated worlds (or even just portions of worlds) offer some good potential for wizards and world building. Imagine someone recreated the world of Harry Potter in a MOO: another person could contribute the Hogwarts Express, for example. The world builder might have two or three Hogwarts Express packages to choose from, offering different features. Todd's package management system will allow a level of sharing that was never possible before with LambdaMOO.

I highly recommend watching Jane McGonigal's TED talk "The Game That Can Give You Ten Extra Years of Life."

Thursday, July 12, 2012

A C++ version of Stunt is born

Compiling:
-*- mode: compilation; default-directory: "~/Sites/projects/moowork/stunt-swain/" -*-
Compilation started at Thu Jul 12 19:38:35

make
[ config.h : config.status ]
./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
g++ -m32 -O -DHAVE_CONFIG_H  -c -o ast.o ast.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o base64.o base64.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o code_gen.o code_gen.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o collection.o collection.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o db_file.o db_file.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o db_io.o db_io.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o db_objects.o db_objects.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o db_properties.o db_properties.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o db_verbs.o db_verbs.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o decompile.o decompile.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o disassemble.o disassemble.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o eval_env.o eval_env.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o eval_vm.o eval_vm.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o exceptions.o exceptions.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o exec.o exec.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o execute.o execute.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o extension-fileio.o extension-fileio.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o extensions.o extensions.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o functions.o functions.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o hmac_sha2.o hmac_sha2.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o http_parser.o http_parser.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o json.o json.c
bison -y -d parser.y 
mv -f y.tab.c parser.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o parser.o parser.c
touch y.tab.h
g++ -m32 -O -DHAVE_CONFIG_H  -c -o keywords.o keywords.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o list.o list.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o log.o log.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o map.o map.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o match.o match.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o md5.o md5.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o name_lookup.o name_lookup.c
touch net_single.o
touch net_multi.o
g++ -m32 -O -DHAVE_CONFIG_H  -c -o network.o network.c
touch net_mp_selct.o
touch net_mp_poll.o
touch net_mp_fake.o
g++ -m32 -O -DHAVE_CONFIG_H  -c -o net_mplex.o net_mplex.c
touch net_bsd_tcp.o
touch net_bsd_lcl.o
touch net_sysv_tcp.o
touch net_sysv_lcl.o
g++ -m32 -O -DHAVE_CONFIG_H  -c -o net_proto.o net_proto.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o numbers.o numbers.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o objects.o objects.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o parse_cmd.o parse_cmd.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o pattern.o pattern.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o program.o program.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o property.o property.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o quota.o quota.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o regexpr.o regexpr.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o server.o server.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o sha1.o sha1.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o sha256.o sha256.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o storage.o storage.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o streams.o streams.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o str_intern.o str_intern.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o sym_table.o sym_table.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o tasks.o tasks.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o timers.o timers.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o unparse.o unparse.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o utils.o utils.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o verbs.o verbs.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o version.o version.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl.o yajl.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_alloc.o yajl_alloc.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_buf.o yajl_buf.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_encode.o yajl_encode.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_gen.o yajl_gen.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_lex.o yajl_lex.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_parser.o yajl_parser.c
g++ -m32 -O -DHAVE_CONFIG_H  -c -o yajl_version.o yajl_version.c
g++ -m32 -O -DHAVE_CONFIG_H ast.o base64.o code_gen.o collection.o db_file.o db_io.o
 db_objects.o db_properties.o db_verbs.o decompile.o disassemble.o eval_env.o
 eval_vm.o exceptions.o exec.o execute.o extension-fileio.o extensions.o functions.o 
hmac_sha2.o http_parser.o json.o keywords.o list.o log.o map.o match.o md5.o 
name_lookup.o network.o net_mplex.o net_proto.o numbers.o objects.o parse_cmd.o 
pattern.o program.o property.o quota.o regexpr.o server.o sha1.o sha256.o storage.o 
streams.o str_intern.o sym_table.o tasks.o timers.o unparse.o utils.o verbs.o 
version.o yajl.o yajl_alloc.o yajl_buf.o yajl_encode.o yajl_gen.o yajl_lex.o 
yajl_parser.o yajl_version.o parser.o -lexpat  -o moo
rm parser.c

Compilation finished at Thu Jul 12 19:38:51
Running:
bash-3.2$ ./moo Stunt.db Stunt.db.new
Jul 12 19:46:36: CMDLINE: Outbound network connections enabled.
Jul 12 19:46:36: STARTING: Version 1.8.3+?_ad_hoc_?? of the LambdaMOO server
Jul 12 19:46:36:           (Using BSD/TCP protocol)
Jul 12 19:46:36:           (Task timeouts measured in server CPU seconds.)
Jul 12 19:46:36:           (Process id 39697)
Jul 12 19:46:36: LOADING: Stunt.db
Jul 12 19:46:36: LOADING: Reading 11 objects ...
Jul 12 19:46:36: LOADING: Done reading 11 objects ...
Jul 12 19:46:36: VALIDATING the object hierarchies ...
Jul 12 19:46:36: VALIDATE: Phase 1: Check for invalid objects ...
Jul 12 19:46:36: VALIDATE: Phase 2: Check for cycles ...
Jul 12 19:46:36: VALIDATE: Phase 3: Check for inconsistencies ...
Jul 12 19:46:36: VALIDATING the object hierarchies ... finished.
Jul 12 19:46:36: LOADING: Reading 94 MOO verb programs ...
Jul 12 19:46:36: NAME_LOOKUP: Started new lookup process
Jul 12 19:46:36: LOADING: Done reading 94 verb programs ...
Jul 12 19:46:36: LOADING: Reading forked and suspended tasks ...
Jul 12 19:46:36: LOADING: Reading list of formerly active connections ...
Jul 12 19:46:36: LOADING: Stunt.db done, will dump new database on Stunt.db.new
Jul 12 19:46:36: INTERN: 770 allocations saved, 9815 bytes
Jul 12 19:46:36: INTERN: at end, 750 entries in a 10007 bucket hash table.
Jul 12 19:46:36: Loaded protect cache for 177 builtin functions
Jul 12 19:46:36: LISTEN: #0 now listening on port 7777
Jul 12 19:46:36: > WARNING: Log-in via passkey is enabled for the following players
 (specified in $passkey_players):
Jul 12 19:46:36: > WARNING:   "Wizard" (#5)
Jul 12 19:46:36: > WARNING:   "Programmer" (#6)
Jul 12 19:46:36: > WARNING: This is a severe security vulnerability.  In a secure 
environment you should:
Jul 12 19:46:36: > WARNING:   disable passkey login:
Jul 12 19:46:36: > WARNING:     ; $disable_passkey_login = 1
Jul 12 19:46:36: > WARNING:     ; $passkey_players = {}
Jul 12 19:46:36: > WARNING:   disable existing passkeys:
Jul 12 19:46:36: > WARNING:     ; #5.passkey = 0
Jul 12 19:46:36: > WARNING:     ; #6.passkey = 0
Jul 12 19:46:36: > WARNING:   and for good measure:
Jul 12 19:46:36: > WARNING:     ; set_player_flag(#5, 0)
Jul 12 19:46:36: > WARNING:     ; set_player_flag(#6, 0)
Jul 12 19:46:36: > PASSKEY for "Wizard" (#5): 14FC3656E763CB43C5E16F4CE9A9B77EE742629677A29048C44423C640A59442 (keep it secret)
Jul 12 19:46:36: > PASSKEY for "Programmer" (#6): 2B3BE77D36447234AE5AEBB920FC1E3F7B0FDAB8D4169A3FED23C57C0753C398 (keep it secret)
Jul 12 19:46:54: ACCEPT: #-2 on port 7777 from localhost, port 56831
Jul 12 19:47:11: CONNECTED: Wizard (#5) on port 7777 from localhost, port 56831
And connecting:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Welcome to Stunt!  For information about Stunt, check out http://stunt.io/.  To 
connect to the server, type "connect ".
connect 14FC3656E763CB43C5E16F4CE9A9B77EE742629677A29048C44423C640A59442
*** Connected ***
In truth, there's one more file that needs modification: exec.c, which uses goto as it was meant to be used but g++ doesn't like it. But that's a small obstacle to overcome.

UPDATE! Todd sent me a patch for exec.c. I've applied, compiled, tested, committed and pushed it.

Monday, July 9, 2012

The finish line nears!: Merging Waverous's C++ changes into Stunt

Yesterday I had several blissful hours to hack away, applying patches to the "waverous" branch in my fork of Stunt.

I had to deal with a few more places in the Stunt code that differed from the Waverous code; namely, Stunt was forked from a later commit of LambdaMOO than Waverous was. (I started with the code base on Sourceforge, whereas Todd started with the code base on Github). There are several places that use a new macro, TRY_STREAM, which in turn uses the original TRY macro. I fixed the compiler error occurring after macro expansion (which didn't turn out to be all that hard, fortunately).

By midnight last night I had the project successfully compiling, which was quite exciting. But the linking phase was failing; I found I was missing a handful of source files in Makefile.in, like json.[hc], collection.[hc] and a few others.

I think the Makefile.in is now up to date and I just have to update the files for File I/O to make g++ happy. After that, there's about 100-150 patches to look at but the vast majority of them are specific to my goals with Waverous, like including the LambdaMOO and JHCore databases, removing scripts used during porting, adding documentation, helper tools like Neil Fraser's Moo Database Browser, etc.

I think there are a handful of patches to apply still that deal mostly with updates to the Autotools but I consider those to come after the milestone of a running "Stunt++" server. Todd announced my work on the MOO Talk mailing list this morning.

Sunday, July 1, 2012

Backporting: Patching Waverous from Stunt

Today I wrapped up a bit of work needed in db_file.c where the TRY/EXCEPT/ENDTRY macros were replaced with their respective code. Somehow one block went missing during the patching process, and I compared files by eyeball between Stunt and Waverous to figure out where things went wrong.

I then applied a change from Stunt to Waverous, the first such change: Todd found the files ref_count.h and ref_count.c were never used since their innards were never seen by the compiler, being hidden by #IF 0 ... #ENDIF blocks.

I cleaned up Waverous's Makefile.in dependency list the usual hard way, which means getting the project to compile and running make depend. I have to revisit how this is done some day because there has to be a better way. Maybe this approach will work. (Edit: actually, with a little bit of thought it isn't necessary to get the project to compile... one just has to run the bison command plus a couple others to generate y.tab.h and parser.c, and then make depend will work fine).

I finally found what I was looking for in git: git-format-patch. Running this in the Waverous project for every commit from where I am now in the commit history to HEAD, I get 223 files. This sounds worse than it actually is:

bash-3.2$ git format-patch 763e7648518c54cf011f4df6011cc796b6838175^..HEAD
0001-Another-questionable-change-that-could-cause-headach.patch
0002-largely-cast-fixes-and-replacing-new-with-_new.patch
0003-Another-one-to-watch-out-for-as-I-did-this.patch
0004-More-cast-fixes-should-have-all-instances-of-try-as-.patch
0005-A-tricky-one.-The-passed-in-data-struct-pointer-was-.patch
0006-Minor-cast-fix.-But-casting-TYPE_STR-is-getting-to-b.patch
0007-Changed-void-to-int-to-satisfy-longjmp-note-that-cb-.patch
0008-The-biggest-issue-in-this-commit-was-the-copying-of-.patch
0009-For-now-committing-this-even-though-the-compiler-iss.patch
0010-Oops.-Accidentally-converted-this_arm-to-self_arm-wh.patch
0011-Fixing-a-few-more-enum-comparisons-the-compiler-didn.patch
0012-Casts-all-around-to-satisfy-the-compiler.patch
0013-There-were-a-few-cases-of-__new-and-new-which-should.patch
0014-one-cast-to-fix-this-file-for-our-old-void-pointer-f.patch
0015-Moved-an-enum-out-of-a-struct-so-it-would-be-in-scop.patch
0016-one-_new-and-a-number-of-casts-made.patch
0017-scratch-file-to-be-deleted-later-list-of-occurances-.patch
0018-ignoring-the-TAGS-file.patch
0019-Added-comment-pointing-to-the-CPP-manual-explaining-.patch
0020-after-macro-expansion-g-complained-that.patch
0021-Fixed-calls-to-getsockname-with-casts.patch
0022-Borrowed-the-definition-of-the-struct-exception-from.patch
0023-various-casts-to-make-the-compiler-happy.patch
0024-More-cast-fixes.patch
0025-Casts-but-these-are-rather-suspicious-to-me.patch
0026-assorted-casts-none-too-scary-looking.patch
0027-Fixing-up-the-function-signatures-so-it-passes-g-.-T.patch
0028-Made-a-goof-changing-the-function-signature-omitting.patch
0029-Fixed-several-function-signatures-which-were-using-p.patch
0030-Some-casts-and-an-accidental-change-of-this_program-.patch
0031-More-casts-one-set-of-macros-expanded-to-fix-casting.patch
0032-fixed-a-missed-catch-keyword-changed-to-_catch-and-a.patch
0033-Casts-and-two-places-there-s-an-in-an-if-statement-w.patch
0034-Fix-cast-to-var_type.patch
0035-Added-workaround-for-casting-a-bitmask-operation.patch
0036-Another-casting-fix-to-get-rid-of-the-compiler-s-com.patch
0037-I-commented-out-the-definition-of-var_type-an-enum-i.patch
0038-cleaning-up-scripts-used-to-massage-the-code-base.patch
0039-cleaning-up-scripts-used-to-massage-the-code-base.patch
0040-cleaning-up-scripts-used-to-massage-the-code-base.patch
0041-cleaning-up-scripts-used-to-massage-the-code-base.patch
0042-Previously-in-execute.c-I-copied-an-enum-out-of-a-st.patch
0043-adding-FUP-to-the-project-not-yet-compiled-in-just-a.patch
0044-temporarily-stashing-this-in-svn-so-I-don-t-lose-it.patch
0045-commiting-Avalon-patch-files-for-now-will-delete-lat.patch
0046-adding-LambdaCore-database.patch
0047-Adding-FUP-files-per-install-instructions.patch
0048-Tweaks-to-compile-on-RedHat-based-linux-system.patch
0049-Tweak-to-let-crypt-be-found-on-linux-use-the-header-.patch
0050-Tweak-to-let-lrand48-be-found-on-linux-use-the-heade.patch
0051-applied-first-avalon-patch-tORIGINAL-d20040322.patch.patch
0052-applied-d20040322-d20040323.patch.patch
0053-applied-d20040323-d20040415.patch.patch
0054-applied-d20040415-d20040416.patch.patch
0055-applied-d20040416-d20041022.patch.patch
0056-applied-d20041022-d20050324.patch.patch
0057-applied-d20050327-d20051106.patch.patch
0058-applied-d20051106-d20051107.patch.patch
0059-Resolved-the-issues-with-expat-and-ident-and-the-cas.patch
0060-removing-ident-stuff-specifically-commented-it-out-o.patch
0061-This-largish-commit-is-mostly-the-work-of-Merlin-and.patch
0062-cleaning-up.patch
0063-oops-missed-one-new-file-to-commit.patch
0064-handle-nil-value-gracefully.patch
0065-Adding-a-tools-directory-and-two-of-Neil-Fraser-s-mo.patch
0066-Rudimentary-script-to-test-the-server.patch
0067-Minor-formatting-change.patch
0068-minor-formatting-change.patch
0069-adding-braces-so-Wall-does-not-complain-about-no-exp.patch
0070-Changed-the-formatter-in-printf-to-ld-to-satisfy-gcc.patch
0071-Linux-on-the-other-hand-does-not-like-ld-at-all-so-s.patch
0072-I-changed-the-printf-s-to-cout-s-to-try-to-make-the-.patch
0073-It-seems-for-Fedora-14-strchr-does-not-want-a-const-.patch
0074-removing-ending-comma-which-pedantic-errors-complain.patch
0075-Cleaning-up-warnings-generated-when-compiled-with-pe.patch
0076-Cleaning-up-warnings-generated-when-compiled-with-pe.patch
0077-though-I-don-t-see-what-the-deal-is-the-compiler-war.patch
0078-removing-unused-variable-timeout-from-proto_accept_c.patch
0079-Added-a-ifndef-for-INT32_MAX-which-is-predefined-by-.patch
0080-annotating-a-function-even-if-briefly.patch
0081-Adding-Neil-Fraser-s-Python-tool-to-convert-a-Moo-da.patch
0082-Minor-cleanup-creating-a-directory-to-store-database.patch
0083-Adding-a-set-of-moo-objects-I-ve-written-over-the-ye.patch
0084-added-a-note-about-missing-features-causing-objects-.patch
0085-directory-to-store-random-artifacts-like-patch-files.patch
0086-I-found-this-via-some-link-for-the-enCore-database-f.patch
0087-I-forget-where-I-picked-up-this-patch-but-it-shows-o.patch
0088-adding-JHCore-database-and-its-copyright-notice.patch
0089-gzipping-the-db-files-for-massive-space-savings.patch
0090-adding-config.log-and-config.cache-to-distclean.patch
0091-commenting-the-rule-pure_moo-purify-is-a-memory-acce.patch
0092-main-must-return-int-claims-g.patch
0093-noting-that-Pavel-used-a-custom-build-of-gperf-to-ge.patch
0094-fixing-the-subpath-to-Minimal.db.patch
0095-removed-the-t-flag-to-etags-which-it-doesn-t-have.-t.patch
0096-This-copy-of-configure.in-comes-from-wp-lambdamoo-of.patch
0097-ed-not-found-on-my-system-changing-it-to-ex.patch
0098-added-configure_input.patch
0099-Updated-versions-of-configure.in-and-the-generated-c.patch
0100-changing-AC_CONFIG_HEADER-to-AC_CONFIG_HEADERS-per-t.patch
0101-quoting-the-argument-to-AC_CONFIG_HEADERS.patch
0102-I-m-removing-the-hardcoded-definition-of-the-compile.patch
0103-Turns-out-I-just-needed-to-change-AC_PROG_CC-to-AC_P.patch
0104-New-generated-configure-file.patch
0105-default-to-m32-for-compiles-since-the-server-is-not-.patch
0106-I-added-the-following.patch
0107-Removing-the-distribution-making-rule-and-its-variab.patch
0108-Basic-top-level-Makefile-the-main-use-being-to-build.patch
0109-getting-rid-of-this-cvs-cruft.patch
0110-Creating-a-chrooted-environment-to-run-waverous-in.patch
0111-Removing-trailing-comma-to-make-pedantic-happy.patch
0112-Ran-GNU-indent-on-all-.h-and-.c-files-to-standardize.patch
0113-Cleanup-removing-all-the-old-rcs-string-constants-an.patch
0114-Currently-this-generates-HTML-only-i.e.-no-Latex-or-.patch
0115-removed-old-CVS-log-entries.patch
0116-removed-outdated-bits-updated-others.patch
0117-Renamed-task_queue-to-TaskQueue-as-a-start-to-making.patch
0118-Removing-more-hopefull-all-of-the-CVS-log-entries-an.patch
0119-Reformatted-struct-names-that-are-internal-to-this-m.patch
0120-In-options.h-it-was-noted-that-using-a-copy-of-GNU-s.patch
0121-removed-CVS-log-entries.patch
0122-commenting-what-a-static-inline-function-is-in-C-ter.patch
0123-Experimental-patch-that-converts-the-Task-struct-to-.patch
0124-1-CPPFLAGS-was-used-but-never-defined-I-ve-added-the.patch
0125-Adding-install-sh-per-the-GNU-Coding-Standards-the-m.patch
0126-stripped-out-old-CVS-log-entries.patch
0127-1-I-don-t-think-anyone-needs-to-mail-Pavil-anymore-r.patch
0128-newest-generated-configure-script.patch
0129-Check-for-expat.h-and-don-t-check-for-the-expat-libr.patch
0130-I-ve-removed-the-DEXPAT_XML-flag-from-the-compiler-f.patch
0131-added-the-standard-DEFS-DEFS-variable-and-DEFS-to-th.patch
0132-I-ve-added-conditionals-to-configure.in-to-test-if.patch
0133-typo-fix-missing-space.patch
0134-I-ve-removed-the-patches-for-configure-aclocal.m4-an.patch
0135-Now-the-user-can-specify-enable-expat-yes-no-to-.-co.patch
0136-Added-ifdef-endif-around-the-code-to-handle-conditio.patch
0137-Added-ifdef-endif-around-the-externs-and-function-ca.patch
0138-Added-USE_EXT_FUP-and-HAVE_EXPAT_H-for-conditional-c.patch
0139-Broke-out-ext-xml.c-from-the-main-group-of-source-fi.patch
0140-Let-the-user-choose-whether-to-include-expat-or-FUP-.patch
0141-Preparing-for-beta2-soonish.patch
0142-Updating-the-name-from-configure.in-to-configure.ac-.patch
0143-updating-the-rule-for-configure.in-to-confiture.ac.patch
0144-Experimental-you-can-now-say-.-configure-enable-open.patch
0145-The-macro-AC_TEST_PROGRAM-was-deprecated-and-replace.patch
0146-yet-another-newest-version-of-configure.patch
0147-Rolling-back-my-changes-for-now-not-sure-why-all-the.patch
0148-I-was-running-into-the-problem-of-in-gdb-linux-I-cou.patch
0149-Documented-the-depend-target-which-requires-files-ge.patch
0150-I-ve-changed-the-configure-options-from-enable-woobl.patch
0151-README-file-added-to-explain-this-directory-and-the-.patch
0152-removing-extraneous-lines-from-chroot.sh.patch
0153-Renaming-this-to-waverous-tester.exp-and-giving-it-t.patch
0154-Renamed-this-file-to-waverous-tester.exp.patch
0155-Adding-the-files-for-fileio.patch
0156-Adding-a-LICENSE-file-to-clarify-all-the-licenses-fo.patch
0157-Inserting-the-license-for-this-file-that-exists-in-a.patch
0158-Adding-the-license-on-behalf-of-Andy.patch
0159-Adding-the-licensing-that-goes-with-this-file.patch
0160-Commenting-on-the-licensing-of-this-file.patch
0161-Expounding-some-more-on-the-licensing-of-the-sources.patch
0162-Renaming-restart.sh-to-mooctl-in-line-with-scripts-i.patch
0163-Updating-the-instructions-by-s-restart-mooctl-g.-Not.patch
0164-Use-0-instead-of-the-script-name-use-gzip-instead-of.patch
0165-testbed-for-playing-with-the-features-of-getopt_long.patch
0166-Got-rid-of-optreset-which-GNU-didn-t-like-and-I-wasn.patch
0167-Explanatory-comments-for-the-case-of-zero.patch
0168-Moved-the-option-to-log-user-commands-in-the-event-o.patch
0169-Adding-the-MCP-2.1-implementation-updating-the-READM.patch
0170-Moved-UNFORKED_CHECKPOINTS-into-.-configure-and-frie.patch
0171-Minor-formatting-update.patch
0172-Redid-the-no-forking-configure-option-is-now-with-fo.patch
0173-Including-licensing-info-for-the-external-package-Fi.patch
0174-Notes-on-what-to-add-in-this-prototype-of-command-li.patch
0175-Largish-commit-to-add-finally-the-package-File-I-O-a.patch
0176-Two-file-wide-changes-and-one-small-one.patch
0177-Small-object-to-test-File-I-O.patch
0178-Added-a-small-example-for-file_open.patch
0179-Fixed-the-dumb-mistakes-I-made-in-my-first-attempt-t.patch
0180-Bumped-up-the-version-number-of-Waverous-tweaked-the.patch
0181-Updated-configure-file.patch
0182-Note-added-about-make-install-in-the-future.patch
0183-Changed-the-default-text-editor-mode-from-c-to-autoc.patch
0184-Dropped-pgperf-the-customized-verion-of-GNU-gperf-th.patch
0185-Removed-pgperf-from-the-LICENSE-file-as-it-s-no-long.patch
0186-Check-for-GNU-gperf-issue-a-warning-if-not-found.-gp.patch
0187-Latest-.-configure-script.patch
0188-Dropping-LambdaMOO-specific-redeclaration-of-AC_FUNC.patch
0189-Removed-checks-for-AUX-ALPHA-NeXT-SGI-HPUX.patch
0190-Moved-the-custom-MOO-m4-macros-into-their-own-file-i.patch
0191-Missing-quote-in-a-comment-fixed.patch
0192-Dropping-the-test-to-see-if-malloc-is-defined-in-std.patch
0193-Further-removing-MOO_MALLOC_H-from-configure.patch
0194-By-specifying-C-as-the-project-language-via-the-auto.patch
0195-At-some-point-in-the-past-I-modified-the-JHCore-db-b.patch
0196-Removing-the-test-for-bzero.-In-some-older-systems-i.patch
0197-Latest-configure.patch
0198-Dropping-the-test-for-the-compiler-s-support-for-the.patch
0199-Latest-configure-file.patch
0200-Next-version-number-will-be-0.2-instead-of-beta2.patch
0201-Removing-errant-use-of-AC_PREREQ-which-autoconf-2.61.patch
0202-I-dunno-if-I-have-the-wrong-version-of-aclocal-or-wh.patch
0203-Latest-.-configure-file-created-by-autoconf.patch
0204-Somehow-I-missed-the-call-to-MOO_CONST-and-autoconf-.patch
0205-Updated-.-configure-script-with-no-more-MOO_CONST.patch
0206-Make-OUTBOUND_NETWORK-a-configure-option.patch
0207-First-cut-at-crediting-the-authors-for-the-conversio.patch
0208-Updated-the-authors-list.patch
0209-Updated-authors-list-again.patch
0210-Adding-the-other-two-canonical-programmer-user-refer.patch
0211-Xythian-s-.gitignore-from-lambdamoo-on-github.patch
0212-Example-make-distcheck-per-the-Autotools-book.patch
0213-Removed-CVS-log-entries.patch
0214-New-version-of-autoconf-thus-new-version-of-.-config.patch
0215-Temporary-log-file-I-m-working-off-of-while-patching.patch
0216-I-m-marking-blocks-with-leading-semicolons-to-note-w.patch
0217-Fix-void-pointer-problems-when-BYTECODE_REDUCE_REF-i.patch
0218-Commented-out-SHAs-I-ve-applied-as-patches-to-Stunt-.patch
0219-Marked-another-commit-as-patched-to-Stunt.patch
0220-Porting-a-change-over-from-Stunt-ref_count.-hc-are-n.patch
0221-Removed-references-to-ref_count.h.patch
0222-Added-some-needed-macros-like-delref-copied-from-Stu.patch
0223-Removed-all-references-to-ref_count.h-and-ref_count..patch
Many of these are not germane to porting Stunt to C++. Some have funny names, and it's a lesson on why one should start every commit with what looks like a Subject: line, something I hadn't adopted while working in Subversion.

Thursday, June 21, 2012

Porting code_gen.c and db_fileio.c

(This entry was written offline during a flight from Las Vegas to Milwaukee today, June 21st 2012. I'm continuing the task of merging Waverous into Stunt, or put another way, getting Stunt to be C++ compliant).

Here's something you hope to never see:

-*- mode: compilation; default-directory: "/Users/swain/Sites/projects/moowork/waverous/server/" -*-
Compilation started at Thu Jun 21 07:10:01

make
[ config.h : config.status ]
./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
g++ -m32 -O -DHAVE_CONFIG_H  -c -o code_gen.o code_gen.c
code_gen.c: In function 'Bytecodes stmt_to_code(Stmt*, GState*)':
code_gen.c:1220: error: invalid conversion from 'int (*)(int*, int*)' to 'int (*)(const void*, const void*)'
code_gen.c:1220: error:   initializing argument 4 of 'void qsort(void*, size_t, size_t, int (*)(const void*, const void*))'
make: *** [code_gen.o] Error 1

Compilation exited abnormally with code 2 at Thu Jun 21 07:10:01
The issue here is the standard qsort() function wants a pointer to a function whose signature has two const void pointers, but LambdaMOO's implementation has two int pointers:
     void
     qsort(void *base, size_t nel, size_t width,
         int (*compar)(const void *, const void *));
I never caught this when I ported Waverous to C++ because I never defined BYTECODE_REDUCE_REF. This suggests to me a way of testing the server by compiling it with every possible combination of flags... this would be one hell of a build-and-smoke test. For every combination of compile-time options: compile the server, start it up, log in and do some basic tasks, shut down. I would have caught this long ago if I'd thought of writing such a test.

After some dedicated surfing via my phone at Milwaukee's airport, which does not have free wi-fi (pththth) I found the solution on www.cplusplus.com:

#ifdef BYTECODE_REDUCE_REF
// See http://www.cplusplus.com/reference/clibrary/cstdlib/qsort/ for
// this usage of standard C's qsort() function
static int
bbd_cmp(const void *a, const void *b)
{
  return ( *(int *)a - *(int *)b );
}
#endif    /* BYTECODE_REDUCE_REF */
It's curious and non-obvious to me that the args within the function are cast and that this satisfies the compiler. On a side note I think being able to google our compiler errors and find solutions is an exception to Fred Brooks's "No Silver Bullet" argument. It feels like an order of magnitude increase in productivity to get help so easily.

I'm now past one of the stickier parts of porting: past the TRY/EXECEPT/ENDTRY preprocessor macros in code_gen.c. I had to edit the file by hand and incorporate the needed expansion of the macros because the block of code in question had added blank lines spacing out the code. I would think patch would have a command line flag to account for this situation, but patch can only handle changes in leading and trailing whitespace.

Tuesday, June 19, 2012

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!

Thursday, June 14, 2012

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.

Sunday, May 6, 2012

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.

Sunday, March 25, 2012

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.

Thursday, February 23, 2012

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.

Monday, January 2, 2012

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.

Thursday, December 1, 2011

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.

Saturday, September 3, 2011

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.

Wednesday, August 3, 2011

The road to 'automake'

Today I deleted another file from the repository, aclocal.m4. It redefined an Autoconf macro to support OSF/1. That was all it did, and aclocal itself wants to generate a file of the same name so that was that... and the macro in aclocal.m4 was taken from a later version of Autoconf anyway.

Now I've returned to an issue I saw a few months back:
bash-3.2$ autoheader
autoheader: warning: missing template: BZERO_IN_STDLIB_H
autoheader: Use AC_DEFINE([BZERO_IN_STDLIB_H], [], [Description])
autoheader: warning: missing template: FSTAT_WORKS_ON_FIFOS
autoheader: warning: missing template: NEED_BSDTYPES_H
autoheader: warning: missing template: NEED_MALLOC_H
autoheader: warning: missing template: NEED_MEMORY_H
autoheader: warning: missing template: NEED_SELECT_H
autoheader: warning: missing template: POLL_WORKS_ON_FIFOS
autoheader: warning: missing template: POSIX_NONBLOCKING_WORKS
autoheader: warning: missing template: SELECT_WORKS_ON_FIFOS
autoheader: warning: missing template: UNDEF_IO_IN_STROPTS_H
autoheader: warning: missing template: USE_OWN_STRING_H
autoheader: warning: missing template: _HPUX_SOURCE
autoheader: warning: missing template: _NEXT_SOURCE
autoheader: warning: missing template: const

I know there are some deprecated macros lurking in configure.ac and I haven't done anything about it yet; high time I took care of this. I am going to strip support for NeXT, SGI and a few other relics too.

Saturday, July 30, 2011

Good news, everyone: 'pgperf' dropped

Yesterday I started a branch in SVN to experiment with changing the directory layout of the project.

While reorganizing everything I had to think about how to handle 'pgperf', the customized version of GNU gperf that shipped with the original LambdaMOO server. gperf is a "perfect hash generator" that creates a hashing function and a lookup function for the LambdaMOO programming language. It generates the file 'keywords.c' in the project. LambdaMOO came with a hacked version because in 1997 gperf didn't support case-insensitive lookup tables, and the original author of LambdaMOO added this feature and included it with the project.

The idea for the project reorganization I have is at the top level of the Waverous project you will see the standard directories you see in a lot of open source projects:
bash-3.2$ ls -l
total 376
-rw-r--r--    1 swain  swain  145516 Jul 29 19:57 ChangeLog
-rw-r--r--    1 swain  swain    8605 Jul 29 19:47 LICENSE
-rw-r--r--    1 swain  swain     343 Jul 29 19:44 Makefile
-rw-r--r--    1 swain  swain   10770 Jul 29 19:47 README
-rw-r--r--    1 swain  swain    2907 Jul 29 19:47 README.Minimal
-rw-r--r--    1 swain  swain   10121 Jul 29 19:47 README.rX
drwxr-xr-x    7 swain  swain     238 Jul 29 22:40 databases
drwxr-xr-x    8 swain  swain     272 Jul 29 19:49 doc
drwxr-xr-x   17 swain  swain     578 Jul 30 09:19 examples
drwxr-xr-x    5 swain  swain     170 Jul 29 19:46 extensions
drwxr-xr-x    5 swain  swain     170 Jul 29 20:00 extras
drwxr-xr-x  148 swain  swain    5032 Jul 30 09:38 src
drwxr-xr-x    8 swain  swain     272 Jul 29 19:45 tools
My goal is to write a Makefile.am that handled the subdirectories that formed "standalone" projects: src (the server), doc (the manual and Doxygen docs), and extras/pgperf.

While waiting for my wife's oil change at the dealership (yay free wi-fi!) I tried to compile 'pgperf' as shipped with the project. Compilation failed due a dependency on varargs.h, "gcc" telling me it was obsolete. This brought to mind a task I've thought about a number of times but hadn't written down: drop pgperf for GNU gperf IFF gperf now supported case-insensitive lookup tables.

GNU gperf added support in 2002 with the flag --ignore-case, so after an afternoon of tinkering, regenerating files, recompiling and testing I've gotten everything working just fine with gperf. I've dropped pgperf entirely from SVN.

On a side note, working with Subversion is so painfully slow now -- I've been using Git for the past six months -- that I'm going to switch the project to Git quite soonish now that Google Code supports Git.

Thursday, July 14, 2011

File I/O is here at last: now a compile-time option

Tonight I did all the legwork (fingerwork?) to make File I/O a compilation option. File I/O is a patch to the LambdaMOO server that allows programmers to manipulate files outside the server.

Someone mentioned my Waverous project on the MOO-talk mailing list back in December 2010, and a followup poster made a disparaging remark about FUP (ext-FUP is the other extension to the server for file manipulation, and they have very different ways of doing it).

I was not sure I had the most recent version of File I/O, which I downloaded from the MOO Resources site. Ken Fox created it originally, but now discourages its use. The person who patched and released it later was Andy Bakun, working at yelp.com these days; he was kind enough to reply to my email that File I/O 1.5p1 was the most recent version to his recollection.

As of now, the version in HEAD of the repository has the configure option --with-fileio and will try to compile File I/O into the server, but it fails quite spectacularly; probably because it won't compile as C++. I have to pick through the errors and fix it up. (addendum, July 2011: it works just fine now. It did need some tweaking so g++ would compile it).

The other task I need to remember -- I should file a ticket -- is if File I/O is compiled in, then there has to be a target directory created to store the files manipulated by the MOO server. The original install instructions call for this directory (simply called "files") to be made in the server directory. I'll have to figure out how to handle this when I get around to developing a proper "install" target to "make."