wainstead is currently certified at Master level.

Name: Steve Wainstead
Member since: 2000-07-19 04:22:01
Last Login: 2012-10-15 15:24:35

FOAF RDF Share This

Homepage: http://www.panix.com/~swain/

Projects

Recent blog entries by wainstead

Syndication: RSS 2.0

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

97 older entries...

 

wainstead certified others as follows:

  • wainstead certified Ward as Master
  • wainstead certified ncm as Master
  • wainstead certified roguemtl as Journeyer
  • wainstead certified dirtyrat as Journeyer
  • wainstead certified jon as Apprentice
  • wainstead certified Xorian as Master
  • wainstead certified robogato as Master

Others have certified wainstead as follows:

  • mbp certified wainstead as Apprentice
  • Telsa certified wainstead as Apprentice
  • jon certified wainstead as Apprentice
  • andrewmuck certified wainstead as Journeyer
  • fxn certified wainstead as Apprentice
  • kishorebalakrishnan certified wainstead as Master
  • larry certified wainstead as Journeyer
  • sethcohn certified wainstead as Master
  • jooon certified wainstead as Journeyer
  • TheCorruptor certified wainstead as Journeyer
  • realblades certified wainstead as Apprentice
  • nixnut certified wainstead as Master
  • obritim certified wainstead as Master
  • brainsik certified wainstead as Journeyer
  • vdv certified wainstead as Master
  • Xorian certified wainstead as Master
  • Sandino certified wainstead as Journeyer

[ Certification disabled because you're not logged in. ]

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!

X
Share this page