barnabas_truman: (dwarf)
The other day my computer's monitor suddenly went completely black with no warning whatsoever. I tried plugging the monitor into another computer and it worked fine; I tried plugging a different monitor into my computer--no signal. Clearly the problem was within my computer.

So I called up Apple Care, navigated through the phone tree, and got to a real live tech support person. I explained the problem, and told him that I had tried shutting down the computer and starting it up again as well.

"So after the screen went black, did you turn it off by holding down the power button or unplugging it?" he asked.

"No," I said proudly, "I used keyboard commands to get to Terminal, then typed in a sudo shutdown command."

"Without being able to see anything?"

"Yup."

I was surprised and pleased at how much the tone of the conversation changed when the tech support person realized "Oh hey, this user actually knows what he's doing!"
barnabas_truman: (army)
I made some typography puns! Everyone loves typography puns!



barnabas_truman: (young whistler)
"Here, go to TextEdit."

"Okay."

"Now hold down Option with one hand and start pressing a bunch of other keys with your other hand."

*typety type type* "Why am I doing this?"

"You seemed to be having so much fun with bullet points I thought you might like a few more cool symbols."

"Oh that's neat; I didn't know it had French quotes!"

"Have you pushed the apostrophe yet?"

"æ. Huh."

"Now press option-shift-apostrophe."

"Æ. Why do I need æ? I don't need æ."

"But what if you need to do archæology on the encyclopædia of Cæsar?"
barnabas_truman: (math)
"Sometimes I think I'd be better off with no computer in my office at all. The only things I need it for are email, website editing, and graphing."

"Can you do all that on an Etch-A-Sketch?"
barnabas_truman: (young whistler)
I finally got around to buying a microphone, hooking it up, and figuring out how to use GarageBand. Here's my first attempt, featuring Barnabas and Barnabas on whistles and Barnabas on bodhran.

Banish Misfortune
barnabas_truman: (army)
I ascended in NetHack again! Elven wizard named Galadriel.

This is, hm, I think the fourth time I've ascended, the third time I've ascended as a wizard, and the first time I've ascended as an elf or as a chaotic character.
barnabas_truman: (army)
Here's all the stuff I have stored on my graphing calculator, in case you were wondering (and/or for my own reference). I wrote all of it myself over the past seven years or so.


AAA: a placeholder for small temporary programs, e.g. if I want to experiment with some sequence to look for patterns but don't need to keep the coding for later.

ABCSPRAC: Abacus Practice; generates two random numbers and an operation (+, -, x, ÷), waits for user to press Enter, and displays the answer.

ANT: checks if current pixel is black or white; if black, changes it to white, turns left, and moves forward; if white, changes it to black, turns right, and moves forward. Leads to some interesting designs, especially if there's already something on the screen. Based loosely on a discussion of emergent properties in Science of Discworld.

BAB3: uses the Babylonian Method to approximate cube roots (see below).

BABYLON: uses the Babylonian Method to approximate square roots. Suppose you want to find the square root of 12. Start by picking a guess; let's say 3. But 3*3 isn't 12; 3*4 is 12. This means that the square root of 12 must be between 3 and 4. The midpoint would be 3.5, so use 3.5 as a new guess and start the process over. But 3.5*3.5 isn't 12; 3.5*3.429 (approx.) is 12, so the square root of 12 must be between 3.5 and 3.429. The midpoint would be 3.4645, so we use 3.4645 as a new guess and start over... and so on. By hand it's tedious, but a calculator program can perform such repetitive tasks extremely quickly. I wrote this for a class in grad school called Topics in Analysis.

BALL: displays a single pixel bouncing off the walls of the screen (and tracing its path). Initial velocity is chosen randomly; velocity can be influenced using the arrow keys.

BALLGRAV: same, but with gravity.

BIRTHDAY: calculates the probability that at least two people have the same birthday in a group of n people.

BISECTIN: the Bisection Method; approximates the x-intercept of a function in a similar fashion to the Babylonian Method. The user picks two numbers as guesses (an upper bound and a lower bound between which the intercept must be); the program finds the midpoint between those guesses and uses that as either the new upper bound or the new lower bound (depending on whether the function's value there is positive or negative) and starts the process over again. Also for Topics in Analysis.

BOUNCE: displays the word "BOUNCE" bouncing around the screen. Rather silly, I'm afraid.

BRIKDRAW: an attempt to make a Breakout-style game. It kinda works but it's really boring and there's no way to lose.

BURNSHIP: an attempt to draw the Burning Ship, a fractal somewhat similar to the Mandelbrot Set. Way too slow. I should try it in LOGO instead.

CIRCINV: displays a circle on the screen, allows user to select a point, and draws the circular inversion of that point (sort of like a reflection, but across the circle rather than across a line). It's useful in certain branches of geometry and I think it might be related to cylindrical mirror anamorphoses. M.C. Escher was probably into it too.

CTROFMAS: given two point masses and the distance between them, finds their center of mass. I wrote it for my own use when I was teaching high school algebra/physics as a quick way of checking students' answers.

DICE: prompts the user for number of dice and number of sides per die, then simulates rolling those dice and displays the total. A nice time-saver for RPGs.

DIRFIELD: given a differential equation, draws a direction field for it. The solution to a differential equation is a curve, or rather a family of curves; the direction field is a grid of small line segments whose direction shows which way a solution curve would be going if it passed through that point. A very useful visualization tool.

DRAWPTRN: fills in pixels on the screen based on a certain algorithm to see if interesting patterns result. Currently I have it set to "if the x-coordinate and y-coordinate are relatively prime, color the pixel black," which does indeed yield an interesting pattern. Might look nice on fabric. I am reminded of the bit in The Difference Engine about a fabric made by Ada Lovelace "feeding raw algebra into a Jacquard Loom."

DRAWRAND: same, but the algorithm is "flip a coin to decide whether to color the pixel black or white." Silly.

E: displays the values of (1+1/n)^n as n grows larger and larger, demonstrating that this gradually approaches 2.71828... or e.

EULER: uses Euler's Method to approximate the solution of a differential equation. It's essentially a numerical version of the direction field mentioned above.

EULERPAR: same, but for parametric equations.

FACTOR: given a whole number, lists all pairs of factors whose product is that number (e.g. given 45, it will list 1, 45, 3, 15, 5, 9).

FIBONACI: lists out as many Fibonacci numbers as the user requests.

GCDEUCLID: uses Euclid's Method to find the greatest common divisor of any two whole numbers.

GR8RACE: asks the user for the strength of gravity, the mass of the race car, the length of the race track, the coefficient of friction, the force the engine can provide, and the car's desired initial and final velocity, and tells the user where the driver should hit the brakes. I wrote this as a quick way to check students' answers for a project in the algebra/physics class.

JACOBI: I have no idea what this does. It appears to be an iterative method for approximating the solution to some sort of matrix equation, so I presume it was for Topics in Analysis. Probably something like the Bisection Method but with matrices?

LAUNCHV: given two numbers A and B and the strength of gravity, tells the user the initial speed and direction with which a projectile must be launched. I'm not quite sure what A and B represent; possibly the coefficients in the equation of the parabolic path the projectile is intended to follow. Another one for checking students' work in the algebra/physics class.

M47R1X: gradually fills the screen with random ones and zeroes. Silly.

MANDLBRT: draws the Mandelbrot Set by making a sequence of calculations for each pixel on the screen. Works well but is very very slow. I'm proud of it but I like my LOGO version better. Amusing trivia: I used the chorus of JoCo's song "Mandelbrot Set" song as my sole reference for programming this.

MANDLCHK: originally just checked if a single point, given by the user, is part of the Mandelbrot Set or not. Useful for checking students' work in the algebra/physics class. I later modified it to also display some neat graphs showing how exactly the aforementioned sequence of calculations converges.

NEWTON: uses Newton's Method to approximate the x-intercept of a function. It starts with a user's guess as usual, then treats the function as a straight line near that guess and figures out where that line would hit the x-axis (easy enough) and uses that x-value as a new guess to start the process over again. Very effective. Another one from Topics in Analysis.

ORANGE: did you ever see that old logic puzzle where you start with a cup of water and a cup of orange juice and you put a spoonful from cup A into cup B and stir, then put a spoonful from cup B into cup A and stir, and so on over and over again? No? Well anyway this program simulates that.

PASCAL: draws Pascal's Triangle with all multiples of n removed. Very neat patterns, especially for prime n. I wrote this while student-teaching Algebra II (and later used it in a presentation for Topics in Analysis) and I'm very proud of it.

PASCLROW: displays all the numbers in row n of Pascal's Triangle.

PASCNORM: displays some scatterplots that are probably intended to imply that the larger rows of Pascal's Triangle begin to approximate the normal distribution from stats? I'm not sure I remember writing this one, but it's definitely my style.

PASSWORD: this isn't a program; it's just where I store the password to the current level on a built-in puzzle game called Blockman. I haven't actually played it in years.

PCOUNT: not quite sure what this does. I think I was using it to count how many steps it takes for a certain p-series, specifically (10/11)^1 + (10/11)^2 + (10/11)^3 + ..., to reach 9, then 9.9, then 9.99, then 9.999, then 9.9999, etc. as it converges towards 10. I think I felt like I was on the verge of discovering something important but then realized that, when examined from a different point of view, is was pretty obvious and mundane so I gave up. I forget what exactly it was though.

PRFACTOR: similar to FACTOR, but instead of listing pairs of factors, it breaks the number down into its prime factors. I was rather proud of this one; it's not a very efficient algorithm but it's one I made up myself and it's a little faster than brute force.

PSERIES: similar to PCOUNT, but without a counter to keep track of how many steps it's taken.

PTRSBURG: simulates the so-called "St. Petersburg Lottery," a somewhat famous exercise in probability theory about a hypothetical gambling game set up in such a way that the only way it can be truly fair is if the cost to play is infinite.

PUNKED: another prank. When the program is running, it looks like the ordinary home screen, and allows the user to type in most simple calculations as normal, but multiplies each result by a random modifier between .99 and 1.01... leading to numbers close to the answer but with something wrong about them. Intended for use on students who rely too much on their calculators but never actually deployed.

PYRAMID: an attempt to extend Pascal's Triangle into three dimensions. Enter a number and the program will give you a square matrix representing a cross-section of Pascal's (Square) Pyramid that many layers down from the top. I've since realized that a pyramid whose cross-sections are equilateral triangles is actually more useful, but this one still has some neat patterns.

QUADFORM: uses the quadratic formula to solve a quadratic. Occasionally useful; mainly I keep it around as a quick and simple example to show students how programming works using a mathematical concept they already know.

QUADITER: uses an iterative method similar to the Babylonian Method to approximate the solutions of a quadratic--as usual, user picks a guess and program repeats some calculation to get a closer guess, and a closer guess, and a closer guess, and so on. Written for Topics in Analysis, of course.

ROCKET: given three numbers (acceleration of gravity, rocket's velocity when observed, and height at which it was observed, I think?), the program calculates when the rocket was launched, when the rocket will land, and how high it reaches. Another one for the physics/algebra class, of course.

ROCKET2: a prank on my co-teacher. I described it to him as "an improved version of the ROCKET program," but it exaggerates the launch time by a factor of 100, gives the land time as π seconds, and claims that the rocket will reach a height of "a shade of green" meters at time "fish" seconds. Silly.

ROT13: given a letter, converts to a number (A=1, B=2, C=3, etc.), then adds 13 and converts it back to a letter. A simple but classic way of encrypting a message. Fun fact: the process of decrypting this particular code is exactly the same as the process of encrypting it, because 13 is exactly half of 26.

SFBDICE: similar to DICE, but modified for use with the damage allocation chart in Star Fleet Battles.

SFBDSTNC: an attempt to create a program that could quickly calculate the distance between any two hexes on a hexgrid based on their coordinates using the hex-labeling system in Star Fleet Battles. Never figured out how to get it to work.

SFBSPEED: type in your ship's speed and this program will tell you when it should move during the turn. Very useful.

SIERPRND: uses a random-walk algorithm to generate, rather surprisingly, the Sierpinski Triangle. Fun to watch.

SLIDESHO: a quick way to display saved images without having to go through a bunch of menus each time. Nice shortcut for showing off related graphs, variations on Pascal's Triangle, zoom-ins of the Mandelbrot Set, etc.

SNOCRASH: creates some small files and makes them bigger and bigger until the calculator's memory is completely full. Silly.

STUDENTS: displays the name of a student, randomly chosen from a list. I used this when I was teaching high school to call on students randomly.

TEMP: converts temperature between celsius and fahrenheit. Another one I use to teach students the basics of programming.

TWENTY4: simulates an old French dice game called Twenty-Four (roll two dice 24 times; if you get double sixes at least once, you win; if not, you lose). Mainly of historical interest; apparently Pascal was inspired to invent modern probability theory when a friend asked him if this was a fair game or not. (Turns out that losing is more likely than winning, but only very slightly.)

TWENTY42: same, but runs the game many times and then displays how many wins vs. how many losses.

VECSPIN: user enters a 2x2 transformation matrix. Program simulates a vector of length 1 spinning around the origin, but displays the result of said vector multiplied by the transformation matrix instead.

VECTRAIL: same as above, but leaves a trail.
barnabas_truman: (dwarf)
cs pu lt 90 fd 700 rt 90 pd make "x 3 repeat 9 [ repeat :x [ fd 30 rt 360 / :x wait 1 ] pu rt 90 fd 10 * :x lt 90 pd make "x :x + 1]

It's good to be back in the driver's seat of the Turtle.


You can run it here to see what it does but you'll want to use this modified version instead to fit their screen:

cs pu lt 90 fd 240 rt 90 pd make "x 3 repeat 9 [ repeat :x [ fd 20 rt 360 / :x ] pu rt 90 fd 7 * :x lt 90 pd make "x :x + 1]
barnabas_truman: (Default)
So! New computer can now reliably run NetHack, Dwarf Fortress (except for macros), and all Infocom games (except for special features like graphics in Arthur, sound in Sherlock, and the timer in Border Zone).

HOWEVER, certain OTHER games will not run. I'M LOOKING AT YOU, BLIZZARD. PATCH STARCRAFT FOR LION NOW PLZ.
barnabas_truman: (army)
Huzzah! I ascended in NetHack again!

This marks the third time ever that I've won this game, and the first time I've won as a non-wizard... specifically, a samurai. Named Jack, of course.

Print Shop

Nov. 28th, 2011 03:48 am
barnabas_truman: (Default)
When I was very young my grandpa, who spent much of his life in the newspaper business, bought a small print shop and hired his sons (my dad and my uncle) to work for him. This was in the early to mid-1980s, when hardware capable of running powerful word processors had become affordable to small businesses but not yet affordable to the average customer--an interesting window of opportunity for this particular industry.

Meanwhile, I was in preschool and often spent days hanging out at the shop. It was great fun--I could hide behind the front desk and read books, play with Lego on the floor, try out a primitive dungeon crawl game on the big computer in Grandpa's office, go out for lunch with Dad, examine the posters about the history of printing (and dinosaurs) decorating the walls, flip through Uncle's tomes of clip art (and learn what "copy-paste" REALLY means), mess around with novelty fonts (stored on glass discs), or try to untangle the Gordian knot of remote-control toys that Grandpa had bought at a swap meet. Later on Dad taught me the basics of typing and paid me a dollar a page to help him with his job (or rather, I now realize, to keep me busy). Later still Grandpa taught me the basics of BASIC. A kid can learn a lot in a place like that.
barnabas_truman: (army)
In one program I am am recording my students' quiz scores in spreadsheets and saving them in HTML format. In another I am uploading them to the server hosting my course website. In a third I am conversing with a friend about the possibilities of automating some of this process for regular use, and in a fourth I am reading comics, checking on the updated site, and bragging about my multitasking. While all of this is happening, a fifth program is playing the soundtracks of old computer games that help me concentrate, and a sixth is juggling the processes of all the others and balancing requests for processor time. Isn't it great to be living in the future?
barnabas_truman: (army)
Important lesson from NetHack:
If you're going to experiment with casting the "polymorph" spell on various piles of useless junk in hopes of turning them into something more useful, do it FAR FAR AWAY from the chest in which you're storing your stash of really important stuff. It turns out that if you polymorph a chest, it turns into a different chest which happens to be empty. Blah.

Losses include...
*Massive amounts of food: acceptable. Still have a reasonable supply in my bag of holding, and a ring of slow digestion so I don't need to eat much anyway.
*Massive amounts of wands: acceptable. Was keeping the wands I actually use (including the wand of wishing) in the bag of holding, so the lost wands were mostly junk.
*Massive amounts of rings: acceptable. See "wands."
*Some sets of dragon scales: annoying, but acceptable, as I was just keeping them as backup in case something happened to my dragon scale armor.
*Every spellbook I owned: DEVASTATING. Knowledge of spells is gradually forgotten and must eventually be refreshed by rereading the spellbook. Without spellbooks I will eventually forget all spells. Stared at the screen in despair for a bit, then figured, well, I'm already at the mouth of hell; maybe if I just start pressing onwards I can finish the game before I forget everything.

Since then, I've reached the bottom of hell, mapped out everything, and found 14 more spellbooks, so things are going reasonably well.
barnabas_truman: (dwarf)
We set up a telephone connection between us and the guys at SRI. We typed the L and we asked on the phone,
"Do you see the L?"
"Yes, we see the L," came the response.
We typed the O, and we asked, "Do you see the O."
"Yes, we see the O."
Then we typed the G, and the system crashed...
Yet a revolution had begun....

(source)
barnabas_truman: (dwarf)
Here's a list of the most recent updates to the upcoming new version:
  • allowed skilled potters to make good crafts on par with other skilled workers
  • stopped meat cleaver and other inappropriate tools from acting as containers
  • stopped bees and vermin from being assignable to pastures
  • made penned animal interface indicate animals' current situation the same way cages/chains do
  • stopped dwarves from encrusting honeycombs with jewels etc.
  • stopped mason from using clay for tables etc.
  • stopped shearing/milking/pasture/cage jobs from fighting with each other
  • hive product collection from removing the hive's building tag
  • stopped megabeasts from coming back to life and continuing to kill people
  • fixed problem where alpaca wool was not treated as wool
  • adjusted overinflated bee values
  • stone stockpiles now include a clay category and some irrelevant materials were excluded
  • added wax cake to pressed material list in stockpiles
  • added wax option to finished goods stockpile
  • stopped dwarves from trying to clean up wax cakes in stockpiles
  • stopped regrow from adding extra grass types on a tile
  • made it select the zone under the cursor zone properly when you enter zone mode
  • one of the text exports no longer lists 0 population domestic animals everywhere
  • added egg yolk/white liquid densities, fixed name error there


What other game would include an "adjusted overinflated bee values" update? This is awesome indeed.

BoxCar2D

Feb. 14th, 2011 04:34 pm
barnabas_truman: (army)
Car design from an evolutionary perspective. Try leaving it on overnight and see what's driving in the morning.

It starts by randomly generating and testing 20 "cars," most of which will suck (some might not even have wheels). Whichever ones go the furthest pass their design information on to the next "generation" of 20, which are similarly tested and culled, and so on. After a few generations the ones that don't go anywhere are gone; after a few more generations most of the cars can move reasonably well; after a hundred or so and most of them are almost completing the course. Pretty neat to watch. You can also design your own cars and let them evolve further. Note also that there are several terrains available, which lead to interesting variation in car development. Check out the "Best Cars" high score list also.
barnabas_truman: (oldstyle)
Over the last few years you may have heard me complain about not being able to make Terminal (a Mac OSX program that allows use of the command line) run fullscreen instead of as a window. Yes, I know that making my monitor show and oldskool text prompt and nothing else wouldn't grant any additional functionality, but it would feel so much better.

Well, I just learned an interesting new trick. If you have a Mac, you can play along at home!

Go to Apple Menu: System Preferences: Accounts and click on Login Options. Set "Display login window as:" to "Name and password" if it isn't already. Close the window.

Go to Apple Menu: Log Out.

At the login screen, type
>console
as your username, and press enter. No password needed. Bam! Fullscreen console command line! Type your usual username and password and you're good to go.

This is so cool. Of course I'll probably just use it for playing NetHack, but it's still awesome.
barnabas_truman: (Default)
Does anyone know if there's a way to transfer Mac Classic fonts to an OSX Mac?

I've managed to transfer all of the old CCCC posters to my new computer and open them with the latest version of AppleWorks, but most of them are trying to use fonts which the new computer doesn't have, so they just show up as Helvetica.
barnabas_truman: (kimiko)
This morning I tried using DiskWarrior to rebuild (i.e. defrag) my hard drive. Doing so requires starting up from the DiskWarrior CD rather than from the hard drive, because it can't make such drastic changes to the current startup disk.

Starting up a Macintosh from a CD is quite easy: simply hold down the "c" key while the computer starts up. I did so, and nothing happened--it just started up from the hard drive as normal. After several identically unsuccessful tries, I instead used the system preferences to set the CD as the default startup disk, which worked.

So I was able to rebuild the hard drive using the CD as the startup disk. Problem was, said CD was now set as the default startup disk, and I had no way of accessing the system preferences from it.

I tried restarting while holding down the Option key, which allows changing the startup disk. No effect. In desperation I tried restarting while holding down the mouse button, which ejects any disk present. No effect.

Time to go to an expert. I happened to have an appointment at an Apple store's Genius Bar today already for an unrelated problem that had gone away on its own, which was a fortuitous coincidence. My assigned Genius tried the same startup commands I had plus a few more, all to no avail. If the computer is not recognizing startup commands at all, that's a rather serious problem. His initial suspicion was that the main logic board was gradually failing, a serious problem which would cost a few hundred bucks to replace.

Fortunately this particular Genius was an oldskool sort of Genius, and, on a hunch, went to the back room and returned with an older model keyboard. After plugging it in, suddenly all the startup commands worked perfectly! CD out, startup with hard drive, everything works fine.

So what was the problem? The new keyboard. Apparently the new keyboard BIOS works differently in such a way that it cannot give commands to the computer during startup. Holding down the mouse button presumably didn't work because the mouse was plugged in to the keyboard. I love the new Apple keyboard, and it's increased my typing speed by about 10 wpm, but this is a SERIOUS problem. Without the ability to give startup commands I cannot use DiskWarrior, or a bunch of other stuff either. Good thing I still have my old keyboard on hand in case this happens again.



TL;DR: The new Apple keyboard is mostly great but apparently shipped without the vital ability to issue commands to the computer during startup. WTF, Apple? Are you not testing your new products at all anymore?



(On the plus side I had a nice conversation with the Genius about the joys of being oldskool, and recommended he try out Lost Vikings and Dwarf Fortress.)

Profile

barnabas_truman: (Default)
barnabas_truman

February 2024

S M T W T F S
    123
45678910
1112 1314151617
18192021222324
2526272829  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 13th, 2025 03:33 pm
Powered by Dreamwidth Studios