Older blog entries for wainstead (starting at number 103)

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!

Syndicated 2013-06-05 20:50:00 (Updated 2013-06-05 20:50:17) from Wainstead

22 May 2013 (updated 22 May 2013 at 17:44 UTC) »
git-sdiff

I've longed for an implementation of sdiff for Git, but in the meantime I have something that works great on OS X. It requires FileMerge, part of the developer tools from Apple. Hat tip to my friend Dale.

This works when:
  • You are in a branch,
  • the branch differs from master, and
  • the file you're interested in differs in your branch and master.

    The command is:
    git difftool -t opendiff $(git log --pretty=format:%H -1 master -- $1) $(git log --pretty=format:%H -1 HEAD -- $1) -- $1

    (I'm using subshell calls to get the SHAs of the file for the branch and master; a simplified look at the command is:
    git difftool -t opendiff SHA-master SHA-branch -- path/to/file.py).

    I put this in a shell script and call it with the relative path to the file. Git is picky about that relative path; it should be relative to the current directory your shell is in, and a directory that is in the repository.

    Assume you named the script my-sdiff. Example:
    my-sdiff relative/path/to/file.py

    You'll be prompted at the shell with something like:
    Viewing: 'relative/path/to/file.py'
    Launch 'opendiff' [Y/n]:

    Just hit RETURN and FileMerge should open, showing you a side-by-side comparison of the file.

    Vexingly, if you get the relative path wrong, nothing happens! If you don't get the Y/n prompt you probably have the relative path wrong.
  • 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."

    Syndicated 2012-12-09 21:50:00 (Updated 2012-12-09 21:52:54) from Wainstead

    26 Sep 2012 (updated 26 Sep 2012 at 16:41 UTC) »

    I haven't called AppleScript from Emacs in a while. Cooked up an Emacs command today to to make iTunes either play or pause, depending on its state. It's nothing fancy.

    (defun sw-pp ()
    "Make iTunes either pause or play"
    (interactive)
    (setq apscript "
    tell application \"iTunes\"
    if player state is paused then
    play
    else
    pause
    end if
    end tell
    "
    )
    (do-applescript apscript)
    )

    (An aside: I'm using the code HTML tag here to render the above code, which doesn't honor indentation. Using the pre tag double spaces the code, which strikes me as a bug).

    Formally, I should use (let) instead of (setq) (which creates and sets a global variable) but I'm too lazy to work out the syntax. Writing Emacs Lisp is not yet second nature to me.

    TIL Emacs's "echo area" is a different thing from the minibuffer.

    I was looking for a way to write to the *Messages* buffer only, and not to the "echo area" at the same time. The function message writes to both the "echo area" and the *Messages* buffer, which is too noisy for my little Emacs extension, desktop-auto-save.

    7 Aug 2012 (updated 7 Aug 2012 at 16:03 UTC) »

    How to teach ctags to read Cheetah template files:
    1) Create a file in your home directory, .ctags (i.e. $HOME/.ctags).

    2) Edit it:


    --langdef=cheetah
    --langmap=cheetah:.tmpl
    --regex-cheetah=/^#def[ \t]*([a-zA-Z0-9_]+)/\1/d,definition/

    (This assumes your Cheetah templates use the extension .tmpl. Change --langmap to suite your needs).

    This is for Exuberant Ctags, not the stock one that ships on some systems. If you run ctags --version and it doesn't tell you it's Exuberant Ctags you probably have a different version.

    Cheetah is a templating system used in Python programming. I use it at work and yesterday I finally decided to do something about Cheetah template support in my TAGS file (I use Emacs; vim users will use a file called "tags").

    Be sure to run ctags again to generate a new tags file; you may need to tweak the command line flags so ctags picks up your template files:

    ctags -e -R --languages=-html,python

    It's neat that this can be accomplished just through command line flags! I thought about writing an extension or a patch in C, but this small bit of work does pretty much all I need.
    13 Jul 2012 (updated 14 Jul 2012 at 04:10 UTC) »

    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.

    Syndicated 2012-07-13 03:49:00 (Updated 2012-07-14 03:14:00) from Wainstead

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

    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.

    Syndicated 2012-07-09 15:26:00 (Updated 2012-07-09 17:36:08) from Wainstead

    1 Jul 2012 (updated 9 Jul 2012 at 17:10 UTC) »

    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.

    Syndicated 2012-07-01 22:35:00 (Updated 2012-07-09 16:37:33) from Wainstead

    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.

    Syndicated 2012-06-22 02:29:00 (Updated 2012-06-22 02:52:35) from Wainstead

    94 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!