# 2008-10-01 Old School Fanzines

There are alternatives to Wizard of the Coast’s Dungeon and Dragon PDF magazines!

Thank you Moritz for reminding me.

Update: Check out 2012-03-04 Old School Fanzines.

# 2008-10-01 Regexp Compilation Not An Issue

I was looking at an Oddmuse wiki with 3741 pages and ran time perl wiki.pl search=fnord raw=1 a few times. It took 1.502 seconds on the second run (the first one runs into disk caching issues). Then I rewrote the SearchString code to compile regular expressions and take it out of the loop. The second search took about 1.480 seconds. Talk about minimal gain

This is disappointing. RadomirDopieralski pointed me to Regular Expression Matching Can Be Simple And Fast by Russ Cox. Maybe that explains why Daniel MacKay’s fix to Oddmuse search using grep as a filter is so much faster than the standard Oddmuse search.

sub SearchTitleAndBody {
my ($query,$func, @args) = @_;
# skip null entries, compile regular expressions
my @regexps = map { qr/$_/i } grep /./,$query =~ /\"([^\"]+)\"|(\S+)/g;
my @found;
my $lang = GetParam('lang', ''); foreach my$id (AllPagesList()) {
my $name = NormalToFree($id);
my ($text) = PageIsUploadedFile($id); # set to mime-type if this is an uploaded file
if (not $text) { # not uploaded file, therefore allow searching of page body OpenPage($id); # this opens a page twice if it is not uploaded, but that's ok
if ($lang) { my @languages = split(/,/,$Page{languages});
next if (@languages and not grep(/$lang/, @languages)); }$text = $Page{text}; } if (SearchString($name . "\n" . $text, @regexps)) { push(@found,$id);
&$func($id, @args) if $func; } } return @found; } sub SearchString { my$data = shift;
foreach my $regexp (@_) { return 0 unless ($data =~ /$regexp/); } return 1; } I think Radomir is right when he says that Perl probably caches all the regular expressions anyway so there is very little time wasted in the original loop. Then again, it seems that regular expressions are not the problem. I returned to the old code and tried index($data, $str) >= 0 instead of ($data =~ /$str/i) but got no gain at all. Gaah! sub SearchTitleAndBody { my ($string, $func, @args) = @_; my @found; my$lang = GetParam('lang', '');
foreach my $id (AllPagesList()) { my$name = NormalToFree($id); my ($text) = PageIsUploadedFile($id); # set to mime-type if this is an uploaded file if (not$text) { # not uploaded file, therefore allow searching of page body
OpenPage($id); # this opens a page twice if it is not uploaded, but that's ok if ($lang) {
my @languages = split(/,/, $Page{languages}); next if (@languages and not grep(/$lang/, @languages));
}
$text =$Page{text};
}
if (SearchString(uc($string), uc($name . "\n" . $text))) { push(@found,$id);
&$func($id, @args) if $func; } } return @found; } sub SearchString { my ($string, $data) = @_; my @strings = grep /./,$string =~ /\"([^\"]+)\"|(\S+)/g; # skip null entries
foreach my $str (@strings) { return 0 unless index($data, $str) >= 0; } return 1; } I must therefore assume that for the simple regular expression I’m using the regular expression machinery is not the limiting factor. It must be page opening or page parsing or something like that. I then tried to avoid parsing the page itself. !OpenPage now takes an argument to shortcut: sub OpenPage { # Sets global variables my ($id, $raw) = shift; return if$OpenPageName eq $id;$OpenPageName = $id; if ($IndexHash{$id}) { my$data = ReadFileOrDie(GetPageFile($id)); return$data if $raw; # must call ParseData later! %Page = ParseData($data);
} else {
%Page = ();
$Page{ts} =$Now;
$Page{revision} = 0; if ($id eq $HomePage and (open(F,$ReadMe) or open(F, 'README'))) {
local $/ = undef;$Page{text} = <F>;
close F;
} elsif ($CommentsPrefix and$id =~ /^$CommentsPrefix(.*)/o) { # do nothing } } } And I use this in a version similar to the very first copy of the code except that I call !SearchString twice:  if (not$text) { # not uploaded file, therefore allow searching of page body
my $data = OpenPage($id, 1); # this may open a page twice if not uploaded
next unless SearchString($name . "\n" .$data, @regexps); # shortcut
%Page = ParseData($data); # avoid parsing page data if ($lang) {
my @languages = split(/,/, $Page{languages}); next if (@languages and not grep(/$lang/, @languages));
}
$text =$Page{text};
}
if (SearchString($name . "\n" .$text, @regexps)) {
push(@found, $id); &$func($id, @args) if$func;
}

This reduced the time used by a bit more than 2%. How disappointing.

Tags:

Comments on 2008-10-01 Regexp Compilation Not An Issue

wow, thanks for doing those tests and posting the results, Alex — maybe the current search code is “close enough” to optimal that we shouldn’t worry about tuning it any more …

Mark Zimmermann 2008-10-02 01:43 UTC

Well, the only strange thing is that if you run perl -d:DProf wiki.pl search=fnord raw=1; dprofpp you’ll see that around a third of the time is spent in !ParsePage. There must still be ways to gain a significant advantage.

AlexSchroeder 2008-10-02 04:49 UTC

Based on an old idea by Daniel MacKay I tried the following:

<   foreach my $id (AllPagesList()) { --- > foreach my$id (GrepFiltered($string, AllPagesList())) { and sub GrepFiltered { # grep is so much faster!! my ($string, @pages) = @_;
return @pages unless $UseGrep; my @result; my$regexp = quotemeta join '|', map { index($_,'|') == -1 ?$_ : "($_)" } grep /./,$string =~ /\"([^\"]+)\"|(\S+)/g; # this acts as OR
open(F,"grep -l -i $regexp$PageDir/*/*.pg|");
while (<F>) {
if (m/.*\/(.*)\.pg/) {
push(@result, $1); } } close(F); return @result; } And guess what? time perl wiki.pl search=fnord raw=1 runs in 0.375 secs. That’s about ¼ of the original running time! Grep does in fact rule over Perl. AlexSchroeder 2008-10-02 22:17 UTC wow, Alex! — a factor of 4 is huge … hmmm … I must study the above code … any chance it could sneak into some future Oddmuse version? (I’m still running 1.835 — apologies, I know I need to update it!) Mark Zimmermann 2008-10-05 11:41 UTC I immediately added it to the latest and greatest version of Oddmuse. :D AlexSchroeder 2008-10-05 13:34 UTC Add Comment # 2008-10-01 Useless Reversing Of Lines Instead of offering something useful from my Emacs init file, let me offer a tiny piece of code the like we’d waste time on while reading [EmacsChannel #emacs]. It is in fact so useless that I won’t even bother to post it on the EmacsWiki. I find these little examples are useful for people trying to learn EmacsLisp, however. How to do this transformation: I like it ti ekil I (the pony) → (ynop eht) Note: 1. The characters in a line are reversed. 2. Matching parenthesis are mirrored. 3. The order of lines remains unchanged. Here’s the code: (defun reverse-chars-in-region (start end) "Reverse the region character by character without reversing lines. Use reverse-region' to reverse the lines in the region." (interactive "r") (let ((str (buffer-substring start end))) (delete-region start end) (dolist (line (split-string str "\n")) (let ((chars (mapcar (lambda (c) (or (matching-paren c) c)) (reverse (append line nil))))) (when chars (apply 'insert chars)) (newline))))) Interesting stuff used: 1. (interactive “r”) to fill start and end 2. split-string to split the string into a list of substrings 3. (append line nil) to split the line into a list of characters 4. matching-paren to translate ( into ) and the other way around Tags: Comments on 2008-10-01 Useless Reversing Of Lines hello alex, in a more recursive style one could use something like : (defun matching-char (char swap) (or (cdr (assoc char swap)) (car (rassoc char swap)) char)) (defun recrev (string &optional swap) (let* ((l (substring string -1 nil)) (c (matching-char l swap)) (s (substring string 0 -1))) (concat c (if (eq (length s) 1) (matching-char s swap) (recrev s swap)))))  then use it with (recrev "(the pony)" '(("(" . ")"))) ---> "(ynop eht)"  – paul.r 2008-10-01 13:51 UTC Add Comment # 2008-10-03 Ancient Warfare Following an ad on Kobold Quarterly I ended up on the site for Ancient Warfare. Ohhhhh… Shiny magazine on greek and roman times!? Should I give it a try? They are based in the Netherlands so maybe shipping will be reasonable, haha. I also found a website for the Medieval European Martial Arts Guild. Interesting. Found that one via an EN World thread on real world ancient heroes, via Jonathan Drain’s post. I haven’t read any EN World in ages. Tags: Add Comment # 2008-10-04 Programmer’s Block and Unit Testing It all started with Radomir Dopieralski asking me how to get around “programmer’s block” on the Oddmuse channel, #oddmuse. Here is what I wrote back: First: I don’t code for weeks. That’s the beauty of free software, I guess. But what about that dread feeling when you look at your code and think that you ought to be fixing something but it just makes you tired just to think about it? This is tricky. I’ve been at that point several times. I felt down when I had to rewrite a large section of my unit tests when I realized that I had to use XPath instead of simple regular expressions. I felt down when I had to dump my attempts at rewriting the RecentChanges code. I had to do that at least twice. I discovered that writing unit tests and modularizing my code (moving things into plugins) helped a lot against that feeling of hopelessness. It helps because you there are no subtle fears and doubts lingering in the back of your mind. If there is doubt, write a test to dispell it. If you can’t, rewrite the code until you can write the tests you need. That part is important. Tests start to drive code organization. It’s important to get that feeling of closure. Do something, verify that it works, and put it behind you. There’s no need to look back; no need to worry. That’s what unit tests can get you. I remember starting to write unit tests when Oddmuse already felt like a big project. There was no way I would ever achieve decent code coverage. I don’t have the time to write tests for testing’s sake. So I started writing the tests I needed right then and there. If there was a bug, I wrote a test to prove the bug, fixed it, and kept the test. If I wrote something weird and complicated, I wrote some tests to prove that it worked. I don’t write tests to check every option and every plugin combination. But when I’m worried, I’ll write a test about the stuff that worries me. “Worries lead to uncertainty. Uncertainty leads to doubt. And doubt leads to suffering.” I was lucky. Perl CGI scripts can be called from the command line. But you can’t use all the HTTP stuff from the command line. That’s why my atom tests require the script to be installed at localhost/cgi-bin/wiki.pl. If it is, I run more tests involving actual HTTP requests. It’s slow, but it works. There’s also an excellent XML library that allows me to write XPath expressions to test my HTML output. That was also an important step. Start small, and keep in mind that unit tests aren’t there to prove anything. They’re there to divide and conquer the code. Do something, then move on and don’t look back. Unit tests help you fight bit-rot. Tags: Comments on 2008-10-04 Programmer’s Block and Unit Testing wonderful citation from star-wars! Greetings from nabu dude Dom 2008-10-05 13:17 UTC Remember days in Orlando and watching Episode 1 several times!? Those were the days, hahaha. AlexSchroeder 2008-10-05 13:33 UTC Add Comment # 2008-10-05 w3m for OSX I’m trying to build w3m on my Mac Mini. It requires pkg-config and gc. pkg-config was not a problem. I had some more issues with gc. I tried 7.1, the latest from CVS, and the latest stable version, 6.7. Only the stable version compiles without errors! The strange part about w3m is that it comes with cookies disabled! To edit this wiki using w3m make sure you enable cookies in w3m! Hit o for options and check for the following: Cookie Settings Enable cookie processing (*)YES ( )NO Print a message when receiving a cookie (*)YES ( )NO Accept cookies (*)YES ( )NO  Otherwise you will have to keep answering the questions! Gah, what a waste of time. I needed to go through all this just to answer somebody’s question regarding w3m and Oddmuse. Update: Now that I have it, I want to use it some more. But I find that my display gets garbled every now and then. As if Terminal.app could not handle non-ASCII characters and added extra spaces or control characters. Gah! Comments on 2008-10-05 w3m for OSX Unless you specifically wanted to test w3m under OSX, I’d recommend using a VM and a linux image. Vmware Fusion is pricey, but methinks there are other free vm engines. I have fusion, and keep a linux image handy for trying out such things. AadityaSood 2008-10-10 06:51 UTC Hm, interesting point. Then again, I feel likt it ought to work and I’m having this geek urge to figure out why it doesn’t work as advertized! AlexSchroeder 2008-10-10 11:29 UTC Actually, I’m giving emacs-w3m a try now. It really looks spiffy! AlexSchroeder 2008-10-10 11:42 UTC Ah, I think the problem is that not only is w3m not interested in remembering cookies – emacs-w3m is just as reluctant! (setq w3m-use-cookies t) AlexSchroeder 2008-10-10 11:52 UTC Add Comment # 2008-10-06 Spells For Clowns A list of clown themed spells created by Marco for his new character Pepe. Pepe is a wizard in our playtest for the M20 Hard Core rules. LevelNameSummaryDetailJustification 1Pepe’s Scary ClownScary clown frightens a creature.A big, scary image of a clown appears. It is the stuff of children’s nightmares; it has sharp claws, long yellow teeth, and blood-red smeary make-up. If affected, the target creature is frightened for 1d4 rounds. If not affected they are shaken for 1 round. Creatures with at least 6HD are not scared of clowns, and are unaffected. Has more or less the same affect as 1st level Cause Fear 2Pepe’s PianoFalling grand piano deals 1d6/level damage (max 10d6) to 5 ft radius.A grand piano falls falls from a height of 10ft/caster level (max 100ft) and lands on the target area, dealing 1d6/level damage (max 10d6) to all creatures in a 5-ft radius.If a ceiling is present the piano will materialise at highest possible point, dealing 1d6 points damage per 10 feet it falls. Does same damage as 3rd level Fireball, except it has smaller range and cannot be effectively used indoors. 2Pepe’s Imolation1 creature/4 levels above 3rd take 1d6 fire damage/round for 4 rounds.Target creature bursts into flame, taking 1d6 points of damage per round for 4 rounds. Target may spend one full round putting themselves out to extinguish the flames. One additional creature for every four levels beyond 3rd (to a maximum of three creatures at 11th level) are affected.Does the same damage as 2nd level Scorching Ray. Creature can extinguish themselves, but deals continual damage (so good against mages). 2Pepe’s Squeaky HammerColourful squeaky hammer attacks opponents.A large, colourful squeaky-hammer appears and attacks opponents at a distance, as you direct it, dealing 1d4 bludgeoning damage per hit +1 point per three caster levels (maximum +5 at 15th level), plus an additional 1d4 sonic damage from the loud ‘sqeak’. It always attacks the target you want it to attack, switching at will. Does same damage as 2nd level Spiritual Weapon. Average damage is slightly higher and deals multiple types of damage, but less effective as force damage (which also affects incorporeal creatures etc). Switching opponents is a free action because there are no move actions in M20. 3Pepe’s Human CannonballConjures a human-cannon.A large, brightly painted cannon is conjured into existance. The cannon is large enough for 1 medium creature to fit inside. A string at the back of the cannon fires the cannon, ejecting whatever/whoever is inside the cannon at high velocity to any 5-ft square within 100ft + 10ft/level, or to a height of half the distance. This string can be pulled either by the person in the cannon, or by a ‘helper’ who is aiming the cannon. A colourful safety helmet comes with the cannon, which protects the ‘human cannonball’ from physical harm during landing, although they are shaken for 1 round afterwards. (The helmet does not protect from additional damage, such as being fired from a cliff, or being shot into a haymaker). If an helper is operating the cannon, the cannon may be aimed and fired at any creature within range, dealing 1d6 damage per caster level (max 10d6). The cannon remains for 1 round/level, or until it is fired. Similar to 4th level Dimension Door, except only one person can be transported, range is limited, and line of sight is required. Extra damage-causing effect possible (requires someone to operate, aim and fire the cannon). 4Pepe’s Tar & FeathersCreature takes 2d8 fire damage +1/caster level (max 10), and receives -4 to attacks, skills, checks, and saves.From one hand a jet of hot tar bursts from the caster’s pointed finger, covering one creature with hot, sticky, tar. The hot tar deals 2d8 heat damage + 1/caster level (max 10). Using the other hand, the caster throws a handful of feathers toward the creature. A huge gust of fluffy white feathers materialise and strike the target, covering him from head to toe. The target creature looks so rediculous he takes a -4 morale penalty to attacks, skills, checks, and saves. Pepe’s Tar and Feathers are extremely sticky, requiring a hot bath and lots of scrubbing to clean all of the tar off. The demoralization affect lasts until it has been scrubbed off. Functions similar to 4th level Bestow Curse, however only one curse may be chosen and it is not permenant. This spell deals a small amount of additional damage. Comments on 2008-10-06 Spells For Clowns I ❤ them. AlexSchroeder 2008-10-06 10:58 UTC HA!…I love clowns… Reverend Mike 2008-10-06 18:57 UTC hahahahaaaaa… I love our first hand made battle map! I treasure this one! Had a good laugh again on the tooth-eyed monsters… – Moni 2008-10-09 10:19 UTC Elsewhere, talking about clowns falling from clouds, somebody commented: When I was a kid my uncle took me to the circus and when I asked about the clowns he explained that, ‘those aren’t real clowns… just men dressed as clowns. Real clowns are too dangerous, they live on islands in the Pacific and file their teeth into points… they can leap high into the air, bite your face off and use your blood to paint their faces. They’re waaaaay too dangerous even for a circus.’ – knobgobbler Wow! AlexSchroeder 2012-12-03 11:22 UTC Add Comment # 2008-10-09 Gruppenplanung Hm… Zwei Kampagnen sind zuende gegangen. Dieser Artikel keine Werbung, keine Rezension, keine Hypothese, und keine Neuigkeit. Dann ist es wohl… Kaffeeklatsch oder so. Ich will irgendwie meine Gedanken ordnen und schreib mal alles nieder. Im Montagsspiel haben wir fünf Spieler, und ein neuer wird wahrscheinlich nächstens dazu kommen. Weil ich unbedingt eine Runde auf M20 Hard Core umstellen will, und weil ich ein wenig das D&D als Taktik Spiel untergraben will, und weil ich hoffe, dass die Spieler sich bei ihren Aktionen nicht von den Regeln einschränken lassen, werden wir nun zwei Abenteuer von Paizo als Spieltest durchspielen. Es handelt sich hierbei um River Into Darkness von Greg A. Vaughan für Stufe 4 Charaktere und Crucible of Chaos von Wolfgang Baur für Stufe 8 Charaktere. Wenn mir die Sache Spass macht, werde ich bei M20 bleiben. Ansonsten werde ich danach D&D 3.5 auf den Stufen 1–9 spielen. In der Montagsgruppe haben wir ein Spiel auf Stufe 15 beendet und der allgemeine Eindruck war, dass extrem viel gekämpft wurde, Charakterentwicklung viel zu kurz gekommen ist, das Theater spielen ebenfalls, das Kaufen von magischen Gegenständen dem Ganzen irgendwie den Zauber genommen hat, usw. Fast alle haben im Einzelgespräch sich gewünscht, dass sich die Dinge ändern. Aber als Gruppe sind wir ziemlich festgefahren. Vielleicht hilft der Regelwechsel etwas. Inzwischen haben wir auch schon einmal gespielt und ich bin sehr zufrieden damit. Der erste Spielabend hat auch schon zu zwei Änderungen der Regeln geführt. Falls es dabei bleibt, super. Irgendwie fühle ich mich seltsam, weil wir für das Sonntagsspiel wieder mit D&D 3.5 von Stufe 1 bis 9 spielen werden. Und dort habe ich auch zwei Spieler, die sich mit den D&D 3.5 Regeln nicht so richtig anfreunden können. Das Sonntagsspiel haben wir auf Stufe 12 beendet; und da waren für ein Spieler schon Stufe steigen, magische Gegenstände einkaufen und dergleichen mehr eher eine mühsame Hausaufgabe als ein erfreulicher Teil vom Spiel. Deswegen wären die einfachen M20 Regeln auch für die Sonntagsgruppe geeignet. In beiden Gruppen hat es aber auch Leute, die an den Regeln gefallen finden, welche den ganzen Aspekt der Regelbeherrschung geniessen. Monte Cook nennt das mastery of the rules. Das macht nicht jedem Spass. Auch mir ist D&D 3.5 ein zu fetter Brocken. Wenn ich aber zurück denke, war auch AD&D früher schon ein zu fetter Brocken. Was wir nicht alles ignoriert haben. Waffengeschwindigkeiten, Segmente für Zaubersprüche, Traglimiten, Boni und Mali für Waffen gegen bestimmte Rüstungen… Es schüttelt mich, wenn ich daran denke. Zurück zu den zwei Gruppen: In beiden hat es Regelliebhaber und Freunde leichter Regeln (gibt’s das überhaupt auf Deutsch oder sagt man hier “weniger” oder gar “einfacher” Regeln). Also setze ich M20 in der Gruppe ein, wo mir das sozio-kulturelle Problem aufgefallen war – wo wir als Gruppe einen Stil gefunden hatten, der keinem mehr passen wollte. Mal schauen wie es weiter geht. Ich bin übrigens ein grosser Freund der einfachen Wikis für Spielrunden. Meinen Campaign Wiki Website dürfen natürlich auch andere Leute verwenden. Die Sonntagsgruppe besteht aus vier regelmässigen Spielern und einem sehr unregelmässigen Spieler. In den letzten Wochen habe ich von vier weiteren Spielern gehört, die eine Runde suchen. Diesen vier Leuten habe ich nun eine Einladung geschickt. Vielleicht vergrössert sich also unsere Sonntagsgruppe. Eine etwas offenere Gruppe wäre mir sowieso lieb. Ich geniesse Peters Grenzmarken Spiel sehr, genau weil es so viele andere Spieler hat. Das Ganze ist so ein Spiel nach der Art von West Marches. Und ich habe die Liste meiner aktiven Spiele nachgeführt. Tags: Add Comment # 2008-10-09 How Many Bot Hits How many hits can be bot hits? I wrote a little Perl script (bot-analyze) to figure out what I’m currently getting:  ---------------------------------Hits-------Actions Total 50709 100% 1% --------------------------------------------------- Googlebot 6600 13% 0% msnbot 3368 6% 1% robots 1342 2% 50% robot 134 0% 24% BecomeJPBot 89 0% 0% VoilaBot 83 0% 0% MSRBOT 76 0% 5%  Is that good or bad? I’m actually trying to figure out if any bots are misbehaving or if my wiki script is providing good enough “guide posts” to point the bots in the right direction. The column Actions refer to bots hitting URLs of the form http://example.org/wiki?action=foo. Those pages have HTML headers saying <meta name="robots" content="NOINDEX,FOLLOW" />. The intent was that bots should a. not index them and b. waste little time crawling them. Apparently one of the bots is misbehaving… Here a sample of grep action=.*robots logs/access.log – apparently history and contrib actions! 61.247.222.53 - - [10/Oct/2008:06:41:54 +0200] "GET /cgi-bin/wiki?action=history;id=EmacsChannel HTTP/1.1" 200 6979 "-" "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" 61.247.222.53 - - [10/Oct/2008:06:42:39 +0200] "GET /cgi-bin/wiki?action=history;id=BooksAboutEmacs HTTP/1.1" 200 7158 "-" "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" 61.247.222.54 - - [10/Oct/2008:06:42:53 +0200] "GET /cgi-bin/wiki?action=contrib;id=timid.el HTTP/1.1" 200 5772 "-" "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" 61.247.222.56 - - [10/Oct/2008:06:43:33 +0200] "GET /cgi-bin/wiki?action=contrib;id=info%2B.el HTTP/1.1" 200 5858 "-" "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" 61.247.222.55 - - [10/Oct/2008:06:44:21 +0200] "GET /cgi-bin/wiki?action=history;id=CollectionOfEmacsDevelopmentEnvironmentTools HTTP/1.1" 200 7827 "-" "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)"  All the links to such history actions are through links using rel="nofollow"! I think this is enough of a reason to ban this Yeti bot. In my .htaccess file: RewriteCond %{HTTP_USER_AGENT} ^Yeti RewriteRule ./ /banned_user_agent.html  Check it out using curl -A "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" http://www.emacswiki.org/emacs/test. Tags: Add Comment # 2008-10-09 Minor Modes I Like I’m looking at all the lines in my .emacs matching “-mode “ … → MinorMode You find some comments and EmacsWiki links after the code. Maybe some of these were made the default in Emacs 23? I get confused easily, and I haven’t checked. (global-font-lock-mode 1) (show-paren-mode 1) (tool-bar-mode -1) (menu-bar-mode -1) (scroll-bar-mode -1) (blink-cursor-mode -1) (winner-mode 1) (windmove-default-keybindings) (column-number-mode 1) (savehist-mode 1) (when (fboundp 'mac-print-mode) (mac-print-mode 1) (global-set-key (kbd "M-p") 'mac-print-buffer)) (iswitchb-mode 1) I want Emacs to highlight matching parenthesis (show paren) and highlight code (global font lock). → EnablingFontLock Yes, I like to keep all the distracting stuff away from my Emacs frames (scroll bar, tool bar, menu bar). → ScrollBar, MenuBar I also hate a blinking cursor (blink cursor). → NonBlinkingCursor Occasionally I feel like the Emacs window configurations need an “undo” (winner), but in actual fact I rarely use it. Actually, I use it about once a year at most. I’ve given up tweaking fancy window configurations. Too bad! → WinnerMode Moving between windows using C-x o is boring and cumbersome, specially if you have more than two windows. Windmove allows you to switch windows faster. → WindMove Switching buffers is faster with iswitchb. → IswitchBuffers Column number mode adds the column to the modeline. Nice. → ModeLineConfiguration Savehist makes sure your minibuffer history is saved and restored between Emacs sessions. → SaveHist Mac print mode only works on my Macs, obviously, which is why I wrapped it in a test. → MacPrintMode Tags: Add Comment # 2008-10-10 Emacs 23 on Mac OS 10.3 My old iBook still runs Mac OS 10.3 aka. Panther. I keep thinking about replacing it with GNU/Linux one of these days. For the moment, however, I still use it when Claudia sits at our Mac Mini. As I have switched to Emacs 23 from CVS on all my major machines, I feel like trying it on my laptop, too. I recently built Emacs 22 for my laptop. Now I feel like I wasted time on that… Oh well. We’ll see whether this works as intended! I discovered that I still have some old libraries in /opt/local – old DarwinPorts stuff? I must confess that these days I hardly use ports anymore. I just download pre-built binaries, or build from source. That’s how awesome the world has become. So anyway, Emacs from CVS → build from source, haha. CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib' ./configure --with-gif=no --with-ns Apparently all this Cocoa stuff is now called !NextStep because of the move to the EmacsApp project. Yikes! No more CarbonEmacsPackage stuff! Strange: As I discovered a while ago, the libraries are not really necessary. And yet ./configure complained when it could not find them. I guess I should report that as a bug. Trying to build it right now… Will report back. Hm… In file included from nsfns.m:36: keyboard.h:324: warning: redefinition of Boolean' /System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h:255: warning: Boolean' previously declared here nsfns.m: In function interpret_services_menu': nsfns.m:293: warning: assignment from incompatible pointer type nsfns.m: In function ns_do_applescript': nsfns.m:2042: error: typeUTF16ExternalRepresentation' undeclared (first use in this function) nsfns.m:2042: error: (Each undeclared identifier is reported only once nsfns.m:2042: error: for each function it appears in.) make[1]: *** [nsfns.o] Error 1 make: *** [src] Error 2 Do I report this as a bug? Update: Doh, I discovered that all the CPPFLAGS etc. settings are not necessary. The only thing you need to use is --with-ns. Add Comment # 2008-10-11 Less Thieves I’ve been talking about thieves in D&D before. Recently James Maliszewski wrote about the same thing saying I Still Don't Like Thieves. The best nugget was to be found in the comments: “What if I want to be a thief?” he asked. “Steal something” I said. I also commented and said that thieving is a mini-game that involves only the DM and the thief player. It makes the game less interesting for others. I’m not talking about the mechanics of hiding, sniping, and sneak attack. I’m mostly referring to trap detecting and disarming, scouting, and successful skill rolls turning into automatic bottlenecks for adventures. What happens if you botch these all-or-nothing rolls? Was failure inconsequential? That’s why I keep warning my players whenever we talk about character creation: I don’t like thieves. James also says “I’d love to see someone come up with a new take on the Thief that addresses these concerns.” Here’s how I’m trying to address it in M20 Hard Core: 1. There are no skills and there is no rogue or thief class. 2. “Better armor is heavy, noisy, and it slows you down.” In a recent game the party was fighting on a ship (River of Darkness by Greg A. Vaughan) in the middle of the night. Anybody could swing up to the upper deck and jump down on foes. This should work only if they are wearing light armor or no armor at all. It’s up to the DM to grant benefits to characters wearing light armor. Tags: Add Comment # 2008-10-11 Taking Notes Note taking… I started using little pocket books to take notes. One book per campaign. There are tons of these nice old-fashioned empty books out there. I find that these work better than taking notes on a wiki. I tried. [1] Here are some of the nicer pages from the end of the Monday game. [2] Click to go to the Flickr page. Find the All Sizes link and look at the details or read the text. Tags: Comments on 2008-10-11 Taking Notes Hey!! :D i love this blog-post.. really.. i always wanted to SEE how other GM do their job.. and this is a great one i think.. cute drawings even if not too precise.. nice calligraphy, not very clean.. but essential… really really a good post! :D Giorgio Vezzini 2008-10-12 00:33 UTC Thank you very much! I find that I need just enough information so that I can improvise the rest at the table. AlexSchroeder 2008-10-12 19:17 UTC Very nice notes! I’m always envious when I see someone else’s beautiful notebooks. The only digital notetaking tool that’s ever worked for me is org-mode. But that would never allow for the beautiful drawings you’ve made. – Matt 2008-10-13 12:37 UTC Thanks. It tuns out that I like to write down notes for adventures while riding the train, lying in bed, waiting for a cake in the oven – which is another reason not to use a computer. Lying in bed with a laptop is awkward, IMHO. AlexSchroeder 2008-10-15 08:17 UTC Add Comment # 2008-10-13 M20 Spellcasters Loose Hitpoints In our last M20 Hard Core session – the second session of River Into Darkness by Greg A. Vaughan – I got the feedback from the level 4 wizard player Marco that he wasn’t enjoying the rule that spellcasting costs hitpoints. Emotionally, there is not much we can do. He’s unhappy, and the rules are there to allow us all to have some fun. I guess one possible reaction would be to tell Marco that maybe the M20 wizards are not for him. In terms of balance, I felt that the wizard was just right. He didn’t overshadow anybody using spells and yet the wizard didn’t suck because there was always things to do. Consider that Moni’s fighter spent four rounds below the ship destroying the trap – doing nothing at all, if you want. In terms of comparison with a D&D 3.5 wizard I also felt that we weren’t doing too badly. Let’s assume a level 4 wizard in D&D 3.5 has 12 hitpoints and knows three 2nd level spells and five 1st level spells (add one each due to an ability bonus). An M20 HC wizard would have around 24 hitpoints, and if he were to cast his favorite spells, he’d spend 12+10 hitpoints to cast three 2nd level spells and five 1st level spells. Yes, in this situation the M20 HC wizard is living very dangerously with only two hitpoints left and no way to heal. Then again, after 30 minutes the M20 HC wizard will be back with his full array of spells. There’s no rationale to demand a 15 minute adventuring day! This, I feel, is a great benefit. At the same time, a wizard can decide to cast three 2nd level spells and leave it at that. He’ll have 12 hitpoints left just like his D&D 3.5 friend, and he’ll still be able join the next fight. Plus a M20 HC wizard has the same attack progression as everybody else. Using a crossbow or a sling will continue to make sense later in the game. When I compare it to my current level 3 dwarven wizard Gar I find that I need to play my D&D 3.5 wizard even more economically. I won’t be using my spells for most encounters, and I’ll use maybe ten charges from a wand per day – most of it being mage armor and burning hands. Personally I didn’t feel like the M20 HC wizard was significantly weaker than the D&D 3.5 wizard. All of these arguments won’t really solve the problem for Marco. So here are some options. 1. Use a house rule I’m using in my Sunday D&D 3.5 game: Level 0 spells can be cast at-will. 2. Reduce costs of all spells by 1. That would mean that level 0 spells can be cast at-will as they cost no hitpoints, and other spells would also be easier to cast. 3. Return to a Vancian magic system with spells per day, and less hitpoints for spellcasters. I need to think about this some more. Right now I don’t feel like changing the rules because the result feels about right. But unfortunately the result just feels right to me. Tags: – and Comments on 2008-10-13 M20 Spellcasters Loose Hitpoints I’d suggest going with 0 level spells being at-will. Alternatively, give him a Magic Point stat which is equal to 3/4 of his current max HP total, and set his new max HP equal to 1/4. For example: if his current max HP is 24, that becomes 18 MP and 6 HP. If he runs out of Magic Points, he can burn Hit Points instead. Essentially it’s still the same (actually a little worse - one good hit and your poor 6 HP Wizard is dead meat) but with a little more old-school (ie, weak Wizard) style. He’ll soon be demanding the original way back greywulf 2008-10-14 00:01 UTC Your writeup provokes several thoughts; some emotional, some logical. Emotionally, I find it perhaps a little unfair to be told “wizards are not for me”. I think that blaming it on the player is little bit too easy to say. On the contrary, wizards are my class of choice above all other classes. Surprised? It’s true. To say “there’s not much we can do for him” is also untrue. This is play-testing, right? Feedback is the point, and evolving the game is a positive result of play-testing. Of course, you may be unwilling to alter the rules, in which case you have my feedback. Logically, I find the “spellcasting costs HP” incorrect. Fighters don’t take damage when they deal it - at least, not directly. A fighter with a high AC, or an archer (even better example) doesn’t take 5HP damage for each bow he shoots. Wizards do. For me, hitpoints represent your will and strength to live. Physical resilience and indestructability. Is spellcasting that harsh that you pour your life essence into each spell you cast? Perhaps, but it’s not what I imagine spellcasting to be. What I propose is the Mana system we discussed last time. You have Mana equal to your hitpoints - in my case 20. The argument against it as I recall was twofold: Wizards have too many hitpoints anyway (1d6 per level), and the spell DCs are far too high, which compensates for only casting two to three spells per round. I would say reduce the hitpoints (make it 1d4 hit die for wizards, or something), and make the monsters harder to hit. Reintroduce the save perhaps? (magic attack = d20 + caster level + spell level + MIND modifier, magic defense = d20 + hit dice + appropriate modifier). In my case I would have 16HP instead of 20, and my magic attack bonus would depend on the monster’s skill and luck. Important for me is that I can participate as a wizard for the entire combat (not a crossbowman or oil hurler or whatever). With regard to Greywulf’s comment, I think you’ve hit on to the same idea I have except that, as you point out, it’s not an improvement. 6HP is not much - I suggest 1d4 per level like regular wizards. Regardless, I’ve laid a few ideas. Take them, drop them, discuss them. I hope it helps develop the game. – Marco 2008-10-14 11:25 UTC Food for thought indeed. I’ll have to figure out what Mana means in terms of numbers of spells a wizard will be able to cast during a fight. It would seem to me that while melee fighters do not take damage while they’re dealing damage, they do need to put themselves into harm’s way in order to do it. Ranged fighters do not take damage while they’re dealing damage, and that’s why the hard core rules variant doesn’t grant a STR bonus to ranged weapon damage. I thought that saves are equivalent to magic defenses, except that the attacker rolls the dice: ; D&D: Attacker determines DC, eg. 10 + spell level + ability bonus. Let’s assume sleep spell by an Int 16 wizard and the DC is 14. Defender rolls d20 + save + ability bonus. Let’s assume a first level guy with a “good” save and no ability bonus, ie. save = level = +1. Mathematically that means roll 13 or higher on a d20 to “save” (40% to save). ; M20: Defender determines DC, 10 + character level + ability bonus. In this case that would 11. Attacker rolls magic attack which is d20 + character level + ability bonus, ie. d20 + 4. Mathematically that means roll 7 or higher on a d20 to “succeed”, ie. 6 or less to fail (30% to save). There will be larger differences as time passes because in a high level D&D game lower level spells have less chances of succeeding due to DC scaling with spell level, ie. caster level halved and good saves progressing at two thirds of your character level. Changing this to a magic attack roll and a magic defense roll would be like changing AC to d20 + armor bonus + dex bonus (this option is in fact discussed in the DMG), ie. it would add more randomness to the result. I’m sure that’s not the intended effect. Sorry about the wording regarding wizards and you. All I wanted to say was that maybe “M20 wizards as written” are not to your liking – I didn’t want to imply anything about D&D wizards or wizards in general. After all, I knew about your wizard character in Bev’s game! AlexSchroeder 2008-10-14 12:09 UTC Maybe I could suggest another way. I’ve recently started playing microlite74, and I’ve added a Vancian houserule to the mix. http://retroroleplaying.smfforfree4.com/index.php/topic,62.0.html The twist is that a Vancian style Wizard can try and reuse the spell, but there are real dangers and very little chance that might happen. (I might, as my players get higher level, allow a bonus to increase the possibility, but I don’t know yet) Not sure if this’ll help, the math you outline makes sense and it sounds like you’re working on a different approach. Chgowiz 2008-12-01 20:08 UTC Add Comment # 2008-10-13 Map Density We’ve started our Alder King campaign. It starts in the jungles of Dangerous Forest in Lenap, Wilderlands of High Fantasy. I had placed ruins and lairs in all the hexes of the map – and my map is about two or three times as large as the player map shown above. During character creation, we needed more places: A secret meeting place for shadow elves. A druid covenant. And so I’m finding that some of the five mile hexes have two locations in them. Yikes! Lesson learnt: Leave some empty hexes for your players to fill. Tags: Comments on 2008-10-13 Map Density Getting maps just right has always been a bugbear with me. After 20 years of gaming I’ve yet to get it right! Bob 2008-10-13 19:04 UTC I’ve written about the “microlight” way of sandbox gaming (→ 2008-09-11 Sandbox Games) – and I think what would have worked better is to make a collection of locations and people without placing them on the map. Just draw the initial hex and the six surrounding hexes, and then wait for the party to actually go somewhere. Then, start distributing the stuff you collected as you add new hexes to the map. Then again, thinking up stuff and placing it on the map is fun, which is why my map grew so fast, I guess. AlexSchroeder 2008-10-15 08:15 UTC Add Comment # 2008-10-14 Cannot Please Them All Player Monday Sunday Notes Alex (me)M20M20Dislikes lots of rules Marcel D&D Likes tactical combat Moni D&D D&D Likes character creation but dislikes the looking up of rules at the table Marco D&D D&D Likes character differentiation on a mechanical level Dani either Likes how M20 allows you to play more because there are no rules to look up Zeno ?Dislikes lots of rules Claudia M20Dislikes character creation and dislikes lots of rules Adrian D&D Likes rules James D&D Sceptical about M20 Florian ?Appears to like rules Thiago ?Doesn’t show up often enough to make a difference (Yeah, I think that those players that didn’t speak out yet like M20 because haven’t complained yet. But I want to make sure. ) It reminds me of Robin’s The evolution of D&D – where he says: 3e D&D: Designed to be fun for the player (but a planning and preparation headache for the GM) Tags: Comments on 2008-10-14 Cannot Please Them All Indeed. My problem is that my players adore Mutants & Masterminds, and can’t understand why I’ve even been willing to consider 4e D&D - which they like too, but more as a Minis game rather than a full rpg. I don’t want to go back to 3e because 4e is SO much better for the GM. They like M20 too, but favour it for one-shot sessions rather than campaigns; overall they prefer a meatier rule set. Based on what you’ve written about your player’s preferences, perhaps 4e would be the way to go as that’s got a good balance between tactical combat, simple in-play rules and great character generation. If you don’t mind using battlemats, of course………. Alternatively, crack open that D&D Rules Cyclopedia I’m thinking of starting an all fantasy M&M campaign soon (perhaps online) in the meantime, and continuing our 4e sessions as a straightforward D&D Fight Club. We’ll see. greywulf 2008-10-14 13:30 UTC Hehe, D&D Rules Cyclopedia for the win! I wonder what I’ll do now. I guess I was in some sort of denial phase. To me, the end of the last campaign around level 15 seemed to be a clear indication that we needed to move away from D&D. Too many dice were being rolled, too many buffs were being cast, too many magic items were being used, too many bonus types and spell effects had to be tracked. But apparently I was the only one to draw that conclusion. Maybe I just need a DM break. Good thing I’m going to spend three weeks in Costa Rica, soon! The coolest thing to happen would be somebody else volunteering as a DM. Then I could just play. AlexSchroeder 2008-10-14 15:09 UTC I think this was just a problem of the high level, and that we were not used to that. If I think about the Grenzmarken session I played (level 2 character), then we don’t have many dices to roll, not too many buffes to worry about, etc. Don’t you think this (beeing level 1 again) will make your life easy again, for at least one year? – Marcel 2008-10-14 15:39 UTC Hehe, I like rules. I think that does sum up my gaming nature nicely – Adrian 2008-10-15 12:49 UTC Hehe. What would be the shortest possible sentence to characters my gaming nature? Hm… This morning I read the following on Zachary Houghton’s blog: I don’t want hours spent on hair-splitting character builds. I don’t want reams of special powers for each player. I don’t want skills and rigid, mutiple modifiers to get in the way of player initiative and creativity. I want me as a GM (CK) and my players to remember when we made rulings, not remained bogged down in rules. This ties into time constraints, but I want a fast-play, unified mechanic. I want the standard tropes and hallmarks of our shared hobby heritage there, unwarped. I want strong character archetypes. I want player backgrounds to matter in the course of play. I want so much of what has made the Old School Renaissance of gaming so inspiring to me and others. Of course, many of these lie at the feet of each Game Master/Castle Keeper, and can happen in any game. But its still good to have an RPG that’s on your side about it. [1] Unfortunately it’s a bit silly to define your gaming nature in terms of the things you don’t want. Hm… “Likes quick and simple rules.” It just doesn’t have a good ring to it. AlexSchroeder 2008-10-15 16:17 UTC Add Comment # 2008-10-14 Google Custom Search Engine For my site, I use a search box, a matching pages box, and a Google search. The trick is that we’re inside a span, and we want to use forms. Therefore I need to end the span, print the forms, and open it again, and use CSS to display them correctly: push(@MyInitVariables, \&SearchBar); sub SearchBar { my$pages = T('Matching Pages:') . ' '
. $q->textfield({-name=>'match'}); my$text = T('Search:').' '.$q->textfield({-name=>'search'});$UserGotoBar .= qq{
</span>
<!-- Search Box -->
<form class="tiny header" action="$FullUrl"><p>$text
</p></form>
<!-- Matching Pages-->
<form class="tiny" action="$FullUrl"><p> <input type="hidden" name="action" value="index" /> <input type="hidden" name="near" value="1" />$pages
</p></form>
<!-- Google CSE Search Box Begins  -->
<input type="hidden" name="cx" value="004774160799092323420:s9wlu0va1v0" />
<input type="text" name="q" size="25" />
</p></form>
<!-- Google CSE Search Box Ends -->
<span>
};


## CSS

/* search box in the top bar */
form.tiny, form.tiny p {
display:inline;
white-space:nowrap;
}
form.tiny input {
width:10ex;
font-size:10px;
}


Tags:

# 2008-10-14 Tags And Feed Icons

I’m using Oddmuse:Indexed Search which also allows me to tag pages using [[tag:foo]]. I wanted to show a nice little RSS icon next to those tags to encourage people to subscribe to particular feeds only.

# I want my own tag rule with RSS icons.
$SearchFreeTextTagUrl =$ScriptName . '?action=tag;id=';
my $RssIconUrl = 'https://alexschroeder.ch/pics/rss.png'; my$RssFeedUrl = 'https://alexschroeder.ch/wiki?action=rss;rcfilteronly=tag:';

$RuleOrder{\&SearchFreeTextTagsRule} = 100; # too lazy to delete it from @MyRules push(@MyRules, \&TagsWithIconsRule); sub TagsWithIconsRule { if (m/\G($\[tag:FreeLinkPattern$\])/cog or m/\G($\[tag:FreeLinkPattern\|([^]|]+)$\])/cog) { # [[tag:Free Link]], [[tag:Free Link|alt text]] my ($tag, $text) = ($2, $3); return$q->a({-href=>$SearchFreeTextTagUrl . UrlEncode($tag),
-class=>'outside tag',
-title=>T('Tag'),
-rel=>'tag'
}, $text ||$tag)
. ' ' . $q->a({-href=>$RssFeedUrl . UrlEncode($tag), -class=>'feed'},$q->img({-src=>$RssIconUrl, -class=>'smiley', -alt=>'RSS'})); } return undef; } On an ordinary site, you’ll probably have CSS for linked images. I do. That’s why I needed the following: /* for regular pictures on my pages */ div.content a img, div.journal a img { margin: 1em; padding: 0.5em; border:1px dotted; } /* but not for RSS icons */ div.content a img.smiley, div.journal a img.smiley, img.smiley { margin: 0; padding: 0; border: none; } Tags: ← Yay baby!! Comments on 2008-10-14 Tags And Feed Icons Hello Alex! Very nice, but what provides this ‘action=tag;id=’ ? Thanks. DeDaLu 2009-04-15 23:02 UTC Some code in my config file. $Action{tag} = \&DoTag;

sub DoTag {
my $id = shift; if ($IndexHash{$id}) { ReBrowsePage($id);
} else {
SetParam('search', 'tag:' . $id); DoJournal(); } } AlexSchroeder 2009-04-15 23:30 UTC It is amazing how you code complex things into so small snippets! Thanks! DeDaLu 2009-04-17 12:33 UTC Thank you. AlexSchroeder 2009-04-17 13:48 UTC Add Comment # 2008-10-14 xkcd gets it I’ve said it before: In order to add my own rhetorical spin to the entire debate, I’ll call myself a privateer! “In peacetime, it is a form of legal piracy.” [1] Tags: Add Comment # 2008-10-16 Converting Monsters for M20 Hard Core I’m running my group through River Into Darkness by Greg A. Vaughan. That requires me to change some stats. I thought I’d give you a quick rundown of what I used until now: Monster HD AC hp damage notes Enraged Dragonnel 815411d6/1d6/1d6Forget about snatching and all that. Kapoacinth Rogues 614351d6/1d6/2d6I think at the beginning I made some mistakes with the hitpoints. Hippo 312n/a 1d6Party scared it away, no need to roll for hp. Elven Ranger 31481d6 Girallion 713351d6/1d6/1d6/1d6/1d6Roll claw attacks in pairs. If both hit: Extra 2d6 damage. Crocodile 213n/a 1d6Our paladin (aka. cleric) killed it with a crit before I could roll for hitpoints. Pygmy Keche 516n/a 1d6/1d6/1d6Roll both claw attacks together. If both hit: Extra 1d6 damage. I rolled hp on the fly. Mamba 11011+8 attack vs STR defense for 1d6/1d6 STR damage Faruq as a zombie 413151d6Improvised some attacks for the yellow musk creeper. Lizardmen 21931d6/1d6+5 to hit because of bless and superior position; AC is high because of the shield. Lizardman Shaman 317101d6/1d6Casts bless, burning hands, and sleep. Shambling Mount 820322d6/2d6Immune to fire & electricity. Elven Warriors 21171d6The party killed about 15 of them before they fled. Esteban 610321d6+2+8 to hit because of fighter levels. I really liked “converting” the monsters: 1. Pick HD 2. Use flat-footed AC if reasonable (in the range of 10-20 at the moment) 3. Determine number of attacks 4. Determine if any of them should do more than 1d6 damage 5. Pick one or two special abilities 6. Roll hitpoints Done. Add Comment # 2008-10-16 Holidays Yay, about six weeks of holidays beginning right now! The day ended with meetings from 9:00 to 17:00 but I think it’s all good. Unfortunately due to an “emergency” I will have to spend two days at the end of October in Germany for a sales meeting. Claudia and I will be spending three weeks in Costa Rica, too. I guess it’s our honeymoon, hehe. Love is in fact amazing. Claudia and I started dating on 1992-03-16. I had just returned from two years in Bangkok the year before, was back in the Swiss school system, a depressed youth with a penchant for The Cure and The Sisters of Mercy. Looking back, I think the first two years were the hardest. We had many discussions on weekends. There were a lot of tears and many misunderstandings. But some inner conviction made us stick together. We just had to work it out! It was difficult to say why we loved each other. It just seemed that we did. And as the years passed we felt like having discovered a soul mate from a previous life. As if our souls had told us right then and there: This is the one! Seize the day! And we did. And even today, more than sixteen years later, my heart is overflowing when we go to bed and our feet touch as we read books; when I kiss her sleepy face as I leave in the morning; when we go out for a drink or dinner; when we dance; when we’re tired at the end of a long day and just need a quick nap in the late afternoon. Tags: Comments on 2008-10-16 Holidays Das hast du sehr schön gesagt. Ich freue mich für euch. Ich hoffe, dass bleibt so, das wünsche ich euch von ganzem Herzen. – Helmut 2008-10-16 23:16 UTC Wann geht die Reise los nach Costa Rica? – Helmut 2008-10-16 23:18 UTC Der Flug geht am 31.10. in der Früh. AlexSchroeder 2008-10-17 07:57 UTC Add Comment # 2008-10-17 Apache Rewrite Adds Slashes Hm… I have an Apache Rewrite problem. Does anybody understand the following? What I wanted to was this: If somebody visits https://alexschroeder.ch/wiki/Foo the request is rewritten to http://www.emacswiki.org/cgi-bin/alex/Foo. This works. If somebody visits https://alexschroeder.ch/wiki?action=foo the request is rewritten to http://www.emacswiki.org/cgi-bin/alex/?action=foo. Notice the extra slash. Why is that? Somebody is sending a 301 Moved Permanently response. But who? Feel free to take a look at the emacswiki.org/htdocs/.htaccess file. I don’t think emacswiki.org/cgi-bin/.htaccess is involved. I’m starting at the RewriteRule documentation and searching for the word “redirect” trying to make sense of it all. The only passage that seems to be relevant: If an absolute URL is specified, mod_rewrite checks to see whether the hostname matches the current host. If it does, the scheme and hostname are stripped out and the resulting path is treated as a URL-path. Otherwise, an external redirect is performed for the given URL. Grrrr! I must have introduced something when I fiddled with .htaccess, recently. And I’ve been getting these for years now. If only I knew what caused them: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘!LimitInternalRecursion’ to increase the limit if necessary. Use ‘!LogLevel debug’ to get a backtrace. Tags: Comments on 2008-10-17 Apache Rewrite Adds Slashes I need to look into this. There is no such problem on the CommunityWiki site, for example. But even after investing quite some time and rewriting my .htaccess file multiple times, I’m no closer to a solution than before. AlexSchroeder 2008-10-18 09:11 UTC Taking a look at this, I have to ask what does the following? I think that redirect is inserting the slash, then your redirect for cgi-bin is working. AaronHawley 2008-10-21 20:09 UTC Hm, could it be that zealous Apache admins are using a vhost config or server config to do that? I don’t see any rule in my htdocs/.htaccess that would add such a slash… AlexSchroeder 2008-10-21 22:24 UTC Its just something Apache has always done: “Description: “Every webmaster can sing a song about the problem of the trailing slash on URLs referencing directories. If they are missing, the server dumps an error, because if you say /~quux/foo instead of /~quux/foo/ then the server searches for a file named foo. And because this file is a directory it complains. Actually it tries to fix it itself in most of the cases, but sometimes this mechanism need to be emulated by you. For instance after you have done a lot of complicated URL rewritings to CGI scripts etc. Solution: “The solution to this subtle problem is to let the server add the trailing slash automatically. To do this correctly we have to use an external redirect, so the browser correctly requests subsequent images etc. If we only did a internal rewrite, this would only work for the directory page, but would go wrong when any images are included into this page with relative URLs, because the browser would request an in-lined object. For instance, […]”[1] AaronHawley 2008-10-22 15:06 UTC Add Comment # 2008-10-17 Instant Messaging Google Talk started blurring the line between Mail and IM. Today I discovered that Adium has Facebook chat support. Amazing. Update: Now I want to update my Facebook status based on my Adium status, of course. I already do that by sending a text message to the Identica bot. This generates an event that runs a shell script that also sets my Twitter status. I installed WWW::Facebook::API from CPAN, but it seems like overkill. Tags: Comments on 2008-10-17 Instant Messaging Wow, haven’t seen that adium supports facebook chat. Just tried it out. Thx 2ni 2008-10-20 10:12 UTC Bis jetzt sieht es so aus, wie wenn mir vor allem auf die Pinnwand geschrieben wird. Das könnte man doch eigentlich auch irgendwie auf einen Chat abbilden. Aber soweit wollten es die Adium Jungs wohl doch nicht treiben, hehe. AlexSchroeder 2008-10-21 10:51 UTC Add Comment # 2008-10-17 Mobile Site We’re going on a trip, soon. That’s why I have started looking at my mobile phone’s config again. I want to check on my website, every now and then! Here’s how I’ve set up my homepage for mobile users. The wrapper script is trivial. All it does is use a different config file. #!/usr/bin/perl package OddMuse;$DataDir = '/org/org.emacswiki/htdocs/alex';
$ConfigFile =$DataDir . '/config-mob';
do 'current.pl';

And the config file sets a few options at the end:

require $DataDir . '/config';$StyleSheet = '';
$EmbedWiki = 1;$RcDefault   = 2;
$ScriptName = 'https://alexschroeder.ch/wiki-mob';$FullUrl     = 'http://www.emacswiki.org/cgi-bin/alex';

The net result:

1. No CSS file used
2. No header and footer shown
3. RecentChanges limited to the last two days
4. All links point to the mobile version of the site (the default config file sets a different script name in order to avoid the cgi-bin in the URL)
5. All page edits go to the real URL because Apache rewrite will loose the post data

Theoretically you could rewrite all requests by mobile phone user agents to this wrapper script. I’ve been too lazy to do that. Instead, I just bookmark the alex-mob location on my phone.

Aside: What’s really cool – once you discover it! – is that you can visit m.google.com with your phone’s browser, pick Gmail, and it’ll allow you to download the Gmail app for your phone. I wasn’t able to use Email or the Gmail app on my Nokia 6300, and not even the guy at the shop knew what to do. He did suggest a new SIM card, however, because mine was so old. I agreed. Surprisingly, this fixed my problems. Now that I spent some time in the config labyrinths of Nokia, I finally discovered that their user interface does suck in certain aspects. Finding the correct place for your configurations is a mess. It took me the longest time to figure out where to set my options and where to activate SSL. And since I got this phone via Claudia’s mother, I still get the occasional references to Sunrise instead of Orange. When I download Email, it says it uses the Internet settings for “Sunrise live” – and I can’t seem to find those anywhere on my phone. Oh well. As long as it works. I guess.

Tags:

musst du dann viel geld zahlen? Ich hatte ne sehr schlechte erfahrung in der zeit in reithe. Da kam ne rechnung von 350 euros wegen internet benutzung. Die inofs auf dem site waren nicht eindeutig und kalr, so dass ich dachte ich könnte billiger über das handy surfen, als wenn ich dort fürs internet zahlen würde. Mail ist natürlich super, wenn es auch etwas mühsam ist, auf dem handy zu antworten. Obwohl ich zugeben muss, im vergelich zu meinem “alten”, 5 jahre alten qtek (smartphone) ist der nokia navigator ein weltwunder, spitze bis gut auf allen gebieten, auch foto und musik, auch mit dem gps bin ich sehr zufrieden. Wünsche euch eine wunder-volle zeit in euren ferien, alles liebe an euch beiden, mama

– mama 2008-10-19 19:09 UTC

Normalerweise verwende ich mein Telefon ja sowieso nur zum Telefonieren. Meistens interessiert mich die technische Spielerei mehr als schlussendlich meine Emails oder Webseiten im Ausland. Heutzutage gibt es ja vor allem fast überall Internet Cafés für Touristen oder Computer mit Netzanschluss in den Hotels; wenn es also darauf ankommt, kann man sich also immer anderweitig (und bequemer und wohl auch billiger) die nötige Information beschaffen.

AlexSchroeder 2008-10-21 10:50 UTC

# 2008-10-21 Blogroll

Some blogs I’m enjoying at the moment:

☆ stands for “I’ve read the entire blog archive.” (Or nearly all of it.) That usually just works for one year of blogging.

Tags:

# 2008-10-23 Ranting

I’ve spent a few hours online in a good ol’ ranting flamewar with Xah about the future of EmacsWiki! The gist is here: EmacsWiki:MissionRant. The real thing is the thread on gnu.emacs.help, however.

Tags:

Aren’t flamewars fun :D

I think your attitude is spot on. Well done, Alex.

greywulf 2008-10-23 23:36 UTC

Well, I 100% agree with your MissionRant but I’m not sure the hours have been well spent ;)

The initial statement would have been enough imho, I don’t think you have to justify yourself against xah because his ultimate goal is the flame not the issue discussed and I don’t think he can change what people think about emacswiki…after all these years the site would be dead if people didn’t love it…so having the mighty emacswiki owner participating to his troll only makes him successful.

(As an aside I think xah never add something useful to emacswiki, even when I invited him to put one of his article, the thing about searching and replacing across multiple files, he kept it on his site…)

– PierreGaston 2008-10-24 07:16 UTC

Well, it was fun to return to the Usenet days of old for a bit.

AlexSchroeder 2008-10-24 10:52 UTC

Yeah, every now and again a good flamewar rant on the usenet can be fun. But only now and again as otherwise it gets depressing.

– Eric 2008-10-24 11:43 UTC

# 2008-10-23 The Campaign World

a land overrun by monstrous civilizations; mad wizards in lost towers; labyrinthine, inexplicable underworld dungeons; forgotten ziggurats of demon-worship; secret temples of forbidden rites; cities ruled by unprincipled despots; lost societies of Neolithic savages; vast unexplored wastelands; enigmatic ruins beneath the seas; frozen citadels atop colossal mountains – from the Solstice Introduction as quoted by Sham aka Dave

I like it.

Recently I took a look at the Wilderness Survival Guide for AD&D 1st ed. Man, all those useless tables – did anybody ever use those? I recently played through River Into Darkness with my players. It also featured rules for regular saving throws due to the oppressive heat and penalties for heavy armor, etc. I didn’t use them. Do your players enjoy these things – or do they enjoy planning around these things using spells or switching armor?

I usually just limit myself to the trees rising like giants, crowding in on the river, the vines dangling down, the ship tearing some of them down occasionally (and we also had a fight with a vicious monkey tribe thus disturbed, so players were paying attention to the trees), the machetes required to move through the jungle unless you are a half-naked savage used to these lands.

Tags:

Comments on 2008-10-23 The Campaign World

I like stuff that makes the players aware of and reacting to the environment, but I hate extra book-keeping. Savage Worlds’ Hazard rules for heat and cold are about the right level of detail for me. I’d certainly contemplate having some extra modifiers for trying to wear plate armor while hacking through a jungle, probably as a penalty on the survival rolls; I certainly wouldn’t go as far as having a special-purpose chart.

Joshua 2008-10-23 15:17 UTC

Can you provide a short summary? I faintly recall somebody saying that they used food problems like random encounters. One entry in the random encounter chart just says “food problem” – and idea I will be using in my own games. What an awesome idea. If you roll the number your rations will have mold, or your water skins will be pierced, etc. It’s easy to keep track of, and it works as inspiration for further adventure. I like it. If the hazard rules you are referring to would work similarly, that would be great.

AlexSchroeder 2008-10-23 23:32 UTC

I don’t make players keep track of characters’ food and water needs, just like I don’t make them keep track of characters’ bathroom breaks.

That said, I may introduce modifiers if they’ve been wandering in the desert for a while, or are otherwise affected by a harsh environment.

Brent P. Newhall 2008-10-24 13:19 UTC

So you just say “you’re at -2 while travelling through the desert” or do you make them roll saving throws? Do you make them roll their saves daily, hourly, or only when required, ie. when a fight is imminent? I guess the last option might also work for me.

AlexSchroeder 2008-10-24 14:41 UTC

# 2008-10-24 Naked

Is there any hope left if you’re sitting naked on your toilet with a laptop on your knees?

Tags:

There’s still hope, as long as there’s toilet paper.

– Marco 2008-10-24 14:10 UTC

Did you see this?

“Morning Routine:

1. Wake up
2. Catch up on the lives of friends around the world
3. Get out from under the covers

Laptops are WEIRD[1]

AaronHawley 2008-10-24 14:53 UTC

Nope. None whatsoever. This is the end.

NoufalIbrahim 2008-10-24 17:09 UTC

Two weeks after getting my first laptop I was sitting on the pot, balancing it on my knees. Now that I am older, I have a small table for this purpose. A part of of my loo-brary is digital now

AlokSingh 2008-10-25 12:50 UTC

Just make sure no one sees you take the laptop into the bathroom. That’s about the worst social faux pas you can commit, especially if other people use the laptop.

– Matt 2008-10-27 14:40 UTC

OMG :groan:

AlexSchroeder 2008-10-27 17:52 UTC

Quite funny

XavierMaillard 2008-10-30 12:07 UTC

# 2008-10-25 Lulu Wishlist

I don’t know when my attitude started to shift. I think it happened when I realized that I wasn’t reading my Kobold Quarterly from beginning to end. I realized: PDF is cool if I want to skim a product to see whether I’d like to use it at the table; but if I wanted to use something at the table, I need it in print. I bought some PDF products from Necromancer GamesTomb of Abysthor and The Lost City of Barakus – and discovered that I’ll have a very hard time running these games without having them available in print. Damn!

Then I bought Fight On I & II from Lulu in print and was delighted. This looks good! I decided to switch my Kobold Quarterly subscription to print.

What else should I get from Lulu these days?

I’m also browsing the list of Necromancer Games products [1] and adding stuff to my [AdventureWishlist wishlist]. I should do some serious Ebay searching a few weeks from now…

Update:

Tags:

Your wishlist almost exactly matches mine.

I would recommend the Phoenix Barony as well!

Zachary 2008-10-25 21:43 UTC

I knew I had forgotten something! Thank you for reminding me.

AlexSchroeder 2008-10-25 23:02 UTC

# 2008-10-26 Off To Germany

In the middle of my holidays I’ve been told to go on a two day business trip to Germany.

Back on Tuesday evening.

PS: The coolest part about daytime savings is when you get up, reset your watch, and go to sleep for another hour.

Zzzzz… 👌

Tags:

# 2008-10-29 Costa Rica

We’ve booked our first hotel for Friday to Sunday: Hotel Coconut House.

We’re starting to get nervous with packing and all that.

Tags:

# 2008-10-29 RPG Blogging

The Gamer Dome has an article on RPG Overload. One aspect the article touches upon is the number of posts on RPG Bloggers.

Here’s how I deal with it: The network allows me to “sample” tons of blogs. I skim the front page and maybe the second page every now and then, looking for new stuff. If I like something, I will subscribe the the individual feed. The network works for me since I use it to discover new blogs by skimming the front page. I don’t try to real all the articles on it.

That’s also why I don’t want a “quality” filter for these blogs. I’m happy the “featured” articles got moved out of the way. I don’t need them. I do appreciate the lack of product announcement and the focus on the personal. I care both about long and thoughtful posts as well as short and funny posts. I want to learn more about our hobby, but I also want to learn more about the people playing it. That’s why I am subscribed to some blogs that also features short and single paragraph posts. I don’t mind.

In fact, I prefer succinct posts to rambling.

Which is why I need to stop.

Tags:

I much prefer short posts (or long posts split into several shorter ones). Who has the time to read all the long ones when you’re supposed to be out there playing?

The network allows people to find what they like/prefer for themselves. As far as I know, the featured posts aren’t driven by the members of the network, but rather by the administrators of the network. Thus, I don’t view it as a very reliable content filter for myself.

jatori 2008-10-29 06:41 UTC

I prefer longer posts, and I agree on RPG Bloggers. I skim the front page for new articles and click on anything that grabs me. I actually don’t subscribe to feeds. Whenever I did subscribe to a feed I ended up ignoring it for front-page roaming as usual.

Wyatt 2008-10-29 14:43 UTC

I recently started reading the archives of my favorite blogs. The archives I’ve been reading through are mostly composed of larger posts that provide food for thought. The blogs with shorter posts are something I like to have as part of “current affairs” I guess.

AlexSchroeder 2008-10-29 21:48 UTC

# 2008-10-29 Science Fiction

Slowly I’m getting the urge to play some Science Fiction RPG.

Here’s what I have:

Here’s what I’m interested in:

Here’s what other people are interested in:

Related articles:

Tags:

While on a business trip to Germany I had some free time one evening and decided to write an Oddmuse extension for translation links. It’s supposed to be a bit like Wikipedia’s translation links, except slightly easier. At some point I had a different extension that allowed you to keep translated pages in synch – something that might be appropriate for a multilingual state run website, but useless for a site thriving on voluntary contributions.

We take advantage of the fact that there is a known number of target languages. Oddmuse can now tell if appropriate translation links exists. If they do, these are shown at the bottom of the page. If not, a link helps the user to pick one of the missing languages and name the new page.

I’ve installed it on the EmacsWiki. See TranslatingPages.

I think it’s elegant and appropriate for Emacs Wiki, quite unlike the existing translation extension which allowed you to keep translations in sync. That is more appropriate for a government site of a multilingual country.

It was inspired by discussions at WikiSym2008 and XavierMaillard’s prompt on EmacsWiki:2008-10-27.

Tags:

That’s awesome ! I hope I can translate as much pages as possible into my native tongue. Thank you for the good job (once again)

XavierMaillard 2008-10-30 11:20 UTC

# 2008-10-29 YSlow

JanneJalkanen suggests that web developers should use YSlow for Firebug to develop fast web applications.

I did that, and changed my htdocs/.htaccess file as follows:

ExpiresActive On
ExpiresDefault "access plus 1 hours"
ExpiresByType image/png "access plus 3 days"
ExpiresByType image/jpeg "access plus 3 days"
ExpiresByType text/css "access plus 3 days"
FileETag none

My cgi-bin/.htaccess file remains unchanged. I think Oddmuse:Caching works just fine.

Looking at one of my pages I now get a score of A (91). I’m not going to use a CDN just yet.

I’m also not going to gzip my HTML output, because I spent too much time making sure that Oddmuse HTML can be served in chunks – compressing it would undo that benefit as I’d have to prepare the gzipped content on the server first, send the header specifying the content length, and then start sending it. For a search, this would mean waiting for Oddmuse to find the last match before starting to send an answer. This needs some more thought.

Tags:

Doesn’t gzip allow compression on the fly? Or maybe the content-lenght is mandatory when compressing?

You could compress only some pages – for example the ones served ‘raw’, like images and stylesheets. Then again, I suppose it’s easier to just make them static…

Yeah, plus images are already compressed.

I thought the content length was mandatory – but now that I think about it, I’m not sure. I’ll check when I’m back.

AlexSchroeder 2008-11-14 00:36 UTC

I was confused by all the stuff I had added. I commented the entires section again. I really want to make sure I understand what’s going on. At the moment, my setup added two cache control headers and prevented Etags from working. What a mess.

Before:

alex@kallobombus:~$curl -I https://alexschroeder.ch/wiki/2015-03-10_Fighting_Wiki_Spam HTTP/1.1 200 OK Date: Tue, 10 Mar 2015 15:33:51 GMT Server: Apache Cache-control: max-age=10 Cache-Control: max-age=3600 Expires: Tue, 10 Mar 2015 16:33:51 GMT Content-Type: text/html; charset=utf-8 Then I commented all the crap in my .htaccess: # ExpiresActive On # ExpiresDefault "access plus 1 hours" # ExpiresByType image/png "access plus 3 days" # ExpiresByType image/jpeg "access plus 3 days" # ExpiresByType image/svg+xml "access plus 3 days" # ExpiresByType text/css "access plus 3 days" # FileETag none And tried again: alex@kallobombus:~$ curl -I https://alexschroeder.ch/wiki/2015-03-10_Fighting_Wiki_Spam
HTTP/1.1 200 OK
Date: Tue, 10 Mar 2015 15:36:47 GMT
Server: Apache
Etag: 1425980395
Cache-control: max-age=10
Content-Type: text/html; charset=utf-8

alex@kallobombus:~\$ curl -I https://alexschroeder.ch/pics/alex-and-beard-80x80.jpg
HTTP/1.1 200 OK
Date: Tue, 10 Mar 2015 15:36:41 GMT
Server: Apache
Last-Modified: Wed, 07 Mar 2012 17:59:57 GMT
ETag: "262871-ce4-4baaaed670140"
Accept-Ranges: bytes
Content-Length: 3300
Content-Type: image/jpeg

I think this is much better!

– Alex Schroeder 2015-03-10 15:43 UTC

# 2008-10-31 Costa Rica

We’re off to Costa Rica starting on Friday early in the morning and we’ll be back November 22nd.

Take care!

Tags:

Happy Travelling! Enjoy.

2ni 2008-10-30 10:16 UTC

Have a nice trip Alex ! Take care and relax

XavierMaillard 2008-10-30 11:15 UTC

# 2008-10 Book Club

When: Tuesday (!) October 21, 19:30 @ Stauffacher Tor (!)

“[He] offers fiercely funny (and often inebriated) Scottish fairies, a poignant love story as well as insights into the gravity of Crohn’s disease, cultural conflicts and the plight of the homeless in this fey urban fantasy.” [1]

Supporters: Chrissie, Alex, Nanda, Debbie, Jill, Sauro.

Links: Martin Millar on Wikipedia, Martin Millar’s Blog, and particularly posts tagged with our book on his blog, his MySpace page (watch out, music will start playing), a more serious website by him?

Tags: