train
The world according to cdlu

Topics

columns elections environment essays foreign guelph highways internet leadership legal linux military money musings ottawa politics presentations radio reform satire transit tv unity

Recent entries

  1. Resettled
  2. Keeping Track - Lawn mowers: our most pampered and successful pets
  3. Keeping Track - The Rails of the Royal City
  4. Keeping Track - Bus system overhaul coming to Guelph while GO station might go to Lafarge after all
  5. Keeping Track - Sikh Temple issue column
  6. Keeping Track - Why Canada should adopt the Turks and Caicos
  7. Keeping Track - Rethinking the commute
  8. Keeping Track - there is always more to discuss
  9. Transportation planning leaves a lot to be desired
  10. A sombre anniversary
  11. Weighing civic politics, punditry
  12. Column: GO service is coming to Guelph
  13. GO Transit EA study for Georgetown to Kitchener expansion complete
  14. Column on UK vs CA rail service
  15. BC defeats PR nearly as soundly as PEI and Ontario
  16. older entries...

Associations

Guelph Blogs
Bring GO service to Kitchener-Waterloo
Progressive Bloggers
Liblogs

Header images

Bloggers' chat

Latest comments

Michael D on Keeping Track - Bus system overhaul coming to Guelph while GO station might go to Lafarge after all
Steve Host on Keeping Track - Bus system overhaul coming to Guelph while GO station might go to Lafarge after all
G. T. on Abolish the Ontario Municipal Board
Anonymous on The myth of the wasted vote
fellow guelphite on Keeping Track - Rethinking the commute

Links of interest

  1. 2009-03-27: The Mother of All Rejection Letters
  2. 2009-02: Road Worriers
  3. 2008-12-29: Who should go to university?
  4. 2008-12-24: Tory aide tried to scuttle Hanukah event, school says
  5. 2008-11-07: You might not like Obama's promises
  6. 2008-09-19: Harper a threat to democracy: independent
  7. 2008-09-16: Tory dissenters 'idiots, turds'
  8. 2008-09-02: Canadians willing to ride bus, but transit systems are letting them down: survey
  9. 2008-08-19: Guelph transit riders happy with 20-minute bus service changes
  10. 2008=08-06: More people riding Edmonton buses, LRT
  11. 2008-08-01: U.S. border agents given power to seize travellers' laptops, cellphones
  12. 2008-07-14: Planning for new roads with a green blueprint
  13. 2008-07-12: Disappointed by Layton, former MPP likes `pretty solid' Dion
  14. 2008-07-11: Riders on the GO
  15. 2008-07-09: MPs took donations from firm in RCMP deal
  16. older links...

October 27th, 2002 (from Advogato)

@echo off
mem/d|find/i "ANSI">nul
if errorlevel 1 goto :error
echo %0%1%2%3%4%5%6%7%8%9|find/i "/?">nul
if not errorlevel 1 goto :help

The opening lines to boggle, as I wrote it in DOS .batch in highschool.

Remember batch files?

They were the only redeeming feature of DOS. They allowed me to learn basic coding skills without getting any kind of compiler or trying to squeeze Linux onto my XT or my PS/2 (personal system, that is, not playstation).

There were only a couple of things you couldn't do without getting additional binaries not included in a basic DOS system.

Mainly, you couldn't sleep, and you couldn't read the keyboard once the "program" was already in progress. To solve these, I used a small file called "keytrap.exe" which was a whopping two or three lines long written for me by an acquaintance with a compiler named Chris Micali, and two small files called getkey.com and getscan.com which were 8 and 10 bytes respectively, and sleep.exe which I got off shareware.com eons ago, and have long since lost the associated license file.

With those tools I spent entirely too much time writing batch files throughout my years at NMH.

For the sake of sheer, morbid curiosity, I've posted a small selection of these batch files here. I strongly recommend NOT running any of them without backing up and quarantining your archaic little DOS box.

Note the existence of "random" number generation in some of those files, particularly the game of boggle.

alias.bat was my attempt to have something with similar functionality to alias in a variety of un*x shells. I had shell access from the computer labs and found this to be a useful little tool missing in DOS. Careful though, alias is a self-installer which makes sure ANSI.SYS is loaded and burrows itself in its own directory.

Once I finally bought a Linux-capable box, I was disappointed to learn that random numbers could be obtained across a large range using a single line in bash - rather than the 200 lines with a limited range of 1 to 100 found in batch - and that reading keyboard input and sleeping could be done without batting an eyelash.

It took all the fun out of scripting.

*sniff*

Posted at 19:42 on October 27, 2002

September 26th, 2002 (from Advogato) | linux | November 30th, 2002 (from Advogato)

Name:
Website:

Type the following characters:

Comments (no preview, html supported):


Google
 
Web cdlu.net

(RSS) Website generating code and content © 2006-2009 David Graham <cdlu@railfan.ca>, unless otherwise noted. All rights reserved. Comments are © their respective authors.