talarubi: (Default)
What would I like to see in a newer design?

MUSHcode has to go. It's slow, clunky, a royal pain to write and even worse to read. It was fine for simple things but it has no place as a serious programming language. Instead, I'd like to see a compiled-bytecode OO language similar to Smalltalk, but geared for ease of "just trying things out", and without any global state, so one can have good and flexible security policies put in place.

I would like the MUSH to be protocol-agnostic. There's no need for @mail if you have the thing respond to IMAP connections, or for channels if you can use Trillian to connect via IRC, is there? Email and IRC clients are far better at what they do than the MUSH will ever be. But if you want a simple in-game interface, it can (eventually) be there.

I want support for graphics, but telnet is still a useful way to connect (from work, etc). One could start with a completely telnet interface to be simple, but structure the rooms and objects to eventually have dual presentation. That way you get either the @description or say a three-quarter view with some limited physics. Some areas could be text-only or graphics-only, but if you just want to chat you don't want to see people move around anyway, so if most environments are dual it's not a problem. Just have some preset walk paths and sit targets in the room for the text clients. Web viewers could see everything in Wiki format, with annotations. This is kind of a burden, but a good one IMHO, it keeps the MUSH accessible to everyone. Same as web accessibility is an important thing.

In the far, far future this should support adding custom (non-dual) environments, such as sidescrollers, space shooters, or complete 3D engines. That needs a lot of abstraction for the players and clients to adapt, but I don't see why it can't be done. It would be a negotiation, something like, "Please supply avatars suitable for this environment which uses Isometric3DCoords, BoundingBoxClipping, PointMassPhysics and a ThreeQuarter3DView" and they could render themselves (in an area of perhaps limited size) from polygons or pixel art. To be more flexible the environment might wrap these avatars, perhaps in a SpaceVehicle, or the player could supply their own compatible implementation, with fancy bumper stickers and EVIL GREEN LASERS.

Also in the future I would move server-side intelligence into the clients too, to lighten the load. Modern networks are peer-to-peer and share everything using checksums and signatures to handle problems. If the server can depend on clients to share bandwidth, data (for avatars etc) and even notifications then this is a big win. (Need some way to detect attacks, probably by signed messages and some form of ping and sequencing.)

Hrm. Just rambling.
talarubi: (Default)
It started as an innocous installment of Lolo 4 or something. There were cutesy additions like molten metal, smelting irons and explosives with playfield destruction. Oh, and... crazed homicidal girlfriends. I guess Lolo and Lala weren't cut out for each other.. o..o

It had a Final-Fantasy-style intro, with the title and credits about nine levels into the game. This is where the dream got distracted, with me trying to get a screenshot while playing this at some friends' pizza party. The emulator is being stubborn; other people are verifying (and fawning over) the magnificent cheesiness of the pizza. The worlds subtly merge, and I am suddenly on a vague RPG quest to gain levels and defeat some villian I will soon find out about--I guess!

Now the game is traditional Lolo tied-in with 3D battles, towns and backstory between "towers." Someone quickly advises me to take initially-weaker but better-long-run character stats when given a choice. I hack my way through the moodily-lit caverns, and soon come to the bustling town, where I fall halfheartedly into comradeship with a mischevious but clumsy-looking Skull gang (referring to their ornamentation of course).

At this point the game has added heaps and heaps of background dialogue (on top of some suspiciously Square-like music). You don't necessarily go up and talk to just one person. Everyone is doing and saying something, and sometimes I found myself sneaking in to listen. And in this way (while trying not to be found out as a gang member/as a deserter) I learned the problem, there is a viral evil afoot, red silken webs tangled through the town. With the obvious corollary: Quick! Follow them!

Not so fast. This is an Zelda/Square style RPG after all, which means that I end up on numerous side-quests, such as mowing the undead neighbors' floating lawns, high above the streets and roads, to raise money. I also somehow manage to hit something critical, possibly whilst in a brawl, and, erm, the town loses power. Uh-oh.

This triggers an amusing cutscene in which my dream-grandfather, owner of a farm, expounds about the virtues of the simple lifestyle in fairly ironic meter. And before I wake up, I start to color the scene in vivid pastels...
talarubi: (Default)
So let's see here...

Word 6:
- Fast, decent program.
- Also uselessly out of date.

OpenOffice 2:
- Nice and fancy. Functionality looks promising.
- Big and slow (it's a word processor, wtf people!!).
- Most of the GUI effort went into the mouse interface.
- Docs are not up to par yet, terse and partially outdated.
- Keyboard appears to be an afterthought--arbitrary shortcuts not assignable, only ones from the list which does not include Alt+*, unlike Word.

vim:
- The classic editor.
- Has a wonderfully rich command set.
- Even does tiled windows and buffers and syntax highlighting to your heart's content.
- After all these years, still runs on a terminal.
- Moreover, still does not support document formatting!

SciTE:
- Wonderful syntax formatting, branch collapsing.
- Understands multiple languages in a source file!! (eg HTML+Javascript)
- Configuration is labyrinthine and really annoying.
- Despite the formatting engine, only edits text files. o..O

Mozilla Composer:
- Great for basic HTML.
- Waaay too dependent on the mouse.
- Badly-integrated CSS support! Only viable way to use CSS is to write stylesheets and then copy and paste text with the right class. :(

Other random editors that bit me:
- Written in Java. Ridiculously slow, awkward GUI.
- Often featurism is adjusted for the author. Buggy in general case.
- Install/uninstall can be an issue (!).
- Sometimes sloppy coding, resource leaks.

Notepad variants:
- Simple and to the point.
- Always available.
- Always, always does what I want (or at least what I said).
- Probably best formatted editor available, if you count HTML. *sigh*

...help? :P
talarubi: (yawn boring classes feh)
Hmmm, I recently finished reading a big chunk of the Camel Book, the first time I managed to slog through it. And for its age, I'm pretty impressed with what the core Perl language claims to do. Tied variables in particular are interesting because it sounds like you could really extend on the tainting mechanism.

Imagine a $formfield->input() method that returns apparently normal strings, except they're really part of a tagged object in disguise. Should you try to call $webpage->print() on one, it will check the tied object and say "hey, I should &entitify this!". Suddenly an XSS bug goes away. The only problem is, I don't know how you'd stop string interpolation from removing the magic. But if you're interpolating form input right into your HTML and SQL, you probably deserve what you're getting yourself into...

Hmm, hmm, lots of interesting thoughts. I wonder where all the module docs are, I want to have some Perl to manage my CDR backups. I think cdrecord even works on windows. Ooooo.

Of course, by the time I really learn perl 5, perl 6 will be out in force. That's alright, the feature list looks positively delicious... amusingly it's a large step closer to Haskell (indeed, they are writing their bootstrap compiler in it)! Caveat: Haskell deeply confuses me in practice.

#438

Aug. 4th, 2005 10:05 pm
talarubi: (Default)
Early one morning, a man walked into church. It was mostly empty, and the service yet to start, so he took his time hedging out a place to sit. It was this that led him to notice the newcomer, another young man in rumpled, warm-colored slacks and shirt.

He was muttering, crouched at the altar with tears in his eyes. "Ah jeez, I beg of you, forgive meh! It is sure as 2 + 2 having worked it, but how else would I have known? The root of all evil is not that square, and certainly far more comp—"

The first man removed his derby and walked up, curious at the gravity of the mathematician's impromptu speech. "For what blaspheme do you repent?"

"Well it is not exactly that...," he said.
"Have you stolen from the village store?"

"Why no, sir!" The suggestion seemed to surprise him. "Still, this is distressing..."
The man scratched his head, wondering what it could be. After all, he didn't figure the guy got out enough to cause any real trouble.

"Have you... forsaken your wife... for God's natural log?"
"Heavens forbid! No, no. Quite a mind you have—I don't even have a wife. But I suppose it is a dark discovery of sorts..." The mathematician grimaced, hoping the man should get it. But understandably, he had no clue.

"Then, whyfor the rains of remorse?"

"Oy! 'cos tan is a sin!"
talarubi: (Default)

Fear.
talarubi: (Default)
So it has come to my attention that graphics code has two requirements:
  • Needs to be flexible.
  • Needs to be fast.

Okay, fine. I have a number of primitives. AlphaBlend, HorizLine (for polygons), TransformSpan, FinishAccumRow (part of the box-interpolated affine transform integral), and all that great stuff. Currently, a lot of these alpha-blend. There is even minor structural support for fallback in case someone doesn't have MMX. (Nevermind that a first-generation Pentium simply isn't fast enough to do what I want...)

But what about other blending modes? If I made a full set of primitives for them all, that really adds up!

Is it more reasonable to pass in MyFunkyBlenderPtr and call it on every pixel? On a K7, call/ret turnaround is at least 9 cycles. Multiply by a reasonable 1Mpixels and you get 9M/700MHz on my machine... 13ms. Half the headroom for something running at 30fps! Although it is not really this bad—K7/P3 can predict call/ret properly. This would still place restrictions on loop unrolling and register usage, though.

Of course it's possible to blend after the fact; today's caches are plenty large enough to hold a scratch scanline or two, and call MyFunkyBlenderPtr on that. I expect the loop and copy overhead would be a little under or equivalent to the procedure call. Maybe less since the shorter loops can be unrolled. I should profile this...

The fanciest option is similar to what FFTW uses. Write a specialized compiler and feed it whatever algorithms and specifications you want. Sometimes a good system even outperforms hand-tuned code.

Oh, and finally there's the issue of rendering to 16- and 24-bit displays. This needs more routines as well, but since those aren't good for internal use, it may as well be a postprocess.

Hm. Just ranting...

Gwa ha.

Jul. 23rd, 2005 12:32 am
talarubi: (Default)
So I was tidying the room a bit. A short-lived endeavour to be sure, since I aaalways get sidetracked by all the fun stuff. And what a trip! This time I found, not only my English class journals, but many of my old drawings.

I scanned about forty of them in! People always tell me they can't draw. My mental response is usually "fine, but it used to be I couldn't either... o..O" So I wanna make a "when Dracus really sucked at art" gallery, with commentary and maybe advice and everything.

I won't inflict you with them all; but here, I think, is pretty damning proof. ^..^;;
talarubi: (16-bit dracus)
  // Pascal lacks signed shift ops--shr clobbers neg values
  TempColor.A := -XC * Sample.A div $10000;
  TempColor.R := -XC * Sample.R div $10000;
  TempColor.G := -XC * Sample.G div $10000;
  TempColor.B := -XC * Sample.B div $10000;

Hey, I wonder if the compiler will replace all this fixed-point math, PER SOURCE PIXEL, with proper shifts! Because there's more where that came from. I have a feeling this is gonna crawl. XD

Ed: Squee! Look at the pretty colors! Hmm, it is spectacularly broken. Dracus go hit code with big stick now!

Ed2: Almost got it. Seems to be some roundoff crap going on, causing pathological behavior (undersampling and pixel junk) at specific values. But it is not too much slower than the axis-aligned zoom, and with some optimization it should be usable. Another nice thing is that I normalize the affine vectors so I sample at the source frequency no matter what. This lends itself to a quality slider, you could sample half the freq instead and quadruple the speed.

Sadly, zooming from 100% -> 90% there is a sudden, slight but noticable appearance of fuzzy. I'm not sure what's causing that, possibly the wimpy lerp eating all the sharp edges. Cubic or Gaussian would be nicer.
talarubi: (16-bit dracus)

Currently trying to run an affine transform on a box filter (English: Drawing surface with arbitrary orientation). Unforunately it's not going to happen tonight, my brain is fried. The irritating part is this is easy conceptually, but...

Consider that one's favorite games are just fancy iterative formulas. Bottom line, they transform your input, and millions of pixels (aka (X,Y,time) coordinates) into shiny (R,G,B) color triples. These are discrete quantities, not continuous infinitesimal functions. To apply any math to this you have to chop it up into little bits. Is this not mind-blowing? Well, the butcher knife makes a damn bloody mess.


I had a couple other ideas the other day. ExpandThe first had to do with multiplying large numbers... ) The second came out talking with [livejournal.com profile] bormac over the other weekend. I got to blathering about games and (as above) quirky computer math. How it's all discrete quantities, and the consequences of that. For example, if you can get your character moving fast enough, in many games you could blink right through a wall because the motion is not continuous, and your only intersection--the game's chance to stop you--would have been between two video frames.

And then it occurred to me that, in a way, [the theory of] quantum physics shows an eerie resemblance. Particles tunnel, elements borrow energy and decay, all sorts of fun things happen... behind everyone's back... as long as the time they take is too small to be observable. That is, as long as it happens quickly enough...

*Twilight Zone music*

talarubi: (Default)
So upon looking for codey things to do with my shiny new tablet...

IMPaSTo - A Realistic, Interactive Model for Paint
OMG. I am humbled. These guys have done exactly what I would have liked to do if I was any good at the math! Beautiful volumetric paint mixing, in six degrees of freedom, with 8-component pigments, dynamically bump-mapped and lit under arbitrary spectra! (Which is to say, it's very very shiny.) While it may not be a true physics simulation, you still need to watch the movie. This is miles above your average digital airbrush. O..O

Litigation ensues, tablet programmer APIs pulled
Aaaagh! I didn't just get a $300 tablet to find out I can't write code for it! Die! *mngrrrr*foam*rrrawrl*drool...*
(Well it sure is a good thing I kept their devkit around! And parents wonder why I hoard stuff.)

O..O

May. 18th, 2005 09:34 am
talarubi: (Default)
Minus Eight o'clock Coffee! It wakes you up, then you drink it! (Anti-decaffeinated varieties also available. Probably much easier on the stomach.)

Which is why, apparently, I had been sitting at the piano banging Colors of the Wind out at 1.5-2x tempo, and making overly dramatic improvisations every time I goofed up. 8)

*ssllllurp!*

Does anyone know where to find information on trimming windows installations? I know there's 98Lite but I don't really want to pay $25 for something that *removes* things, heheh. No? Ohwell. Maybe next time I reinstall I'll play the surgical excision game. I got the laptop down to 60mb or so that way, and it still had Delphi and Palm Desktop installed, so if the screen actually WORKED all the time it would be useful!

Been trying to clean up disk cruft this morning, and booooy is there a lot of it. Damn broadband! I burned a few CDs and now I'm up from 1.5gigs to 4.75gigs free, or so. What I really would like is a program with the following features:
  • A global file index, cataloging files across HD partitions and CD backups;
  • Keywords for different subjects, etc;
  • Ability to view all files at once, from different viewpoints (structure by date and subject—the most important ones);
  • Ability to burn incremental backups to CD, and then tell me which CD to put in to get any given file back. Recently used files stay in a cache on-disk, up to some limit.
  • So I guess you could call it "archiveFS".
Don't want to start another project, though. Hmm.

Apparently, my journal has become a journal again. Yay!

*snore*

May. 16th, 2005 09:24 pm
talarubi: (16-bit dracus)
My dreams are often ever-changing collages of ideas. This is often the way I think daytime, too, albeit to a lesser degree. Take for example, what I just awoke from.

I brought my parents over to Spyro's pretty mountainous residence to show them how to build miniature flyable airplanes out of Legos. I had reassembled this one several times for the game but it seemed someone else had already gotten to it, so I got the fun (not) job of prying all the little long thin half-height pieces apart they'd been using.

They eventually grew impatient and announced their intent, which was to take a drive to the beach! Argh. I was not particularly excited, and even worse, in my haste to pack I left all the good stuff behind--decent books, sketchbook, everything but a Game Boy color with a flavor of Zelda on it. Which, grudgingly, I played on the way. [Ed: Metroid was involved here somewhere but I don't remember what sort of sense it made.]

Eventually we got there, and I found myself wandering around the caves near the beach. Ahh! A twisty maze of dungeon passages. And full of interesting stuff... that I don't remember either. Except that I got to one section and looked at... hey, where'd I get the map? No matter, its pixelly icons denoted two things: A boss cavern, and LOOT! Predictably, as I'd once done early in the Dark World with Titan's Mitt, I snuck in there and ran out with the latter.

Apparently this was a good choice because I had a weapon now, some ubernifty golden yellow sword! It even had the golden sparkly aura around it, so you know it had to be powerful, and that some wise old creature was going to accost me when I got back to the beach.

This was immediately confirmed when I, and the man, did. He told me to take him back to where I found it, a confusing endeavor (with my sense of direction, hah), but I eventually got there with (did I mention?) the help of my young chibi-Linkesque agility and stature. (Probably a first in a dream for me...)

The man led me further astray and introduced me to the alleged Dr. Who and his own (o..O) alleged son. I clambered giddily up on the hood of his banged-up car to say hello. Amidst an exchange of greetings, the plot unfolds...

Except, of course, I woke up.
talarubi: (yawn boring classes feh)
Huh. I dreamt of an insanely sezzy guy, dressed as Red XIII (except upright and scaly) sneaking around outside my bedroom window. It turned out he knew my father and wanted to teach me some interesting job skills. By the time we were touring his job site, though, he was out of the suit. Pity. He was so well-toned (not beefy, mind) that I think I asked him if he'd come to the gym and show me a good workout. ^..^;

I dreamt also of losing constantly to Megaman III. (Even the real game has spots I don't know how to avoid getting hurt. Some have lambasted it for lameass level design.)

Later, while trying to cope with some action-RPG boss, and learn some character skills, I tripped and fell or something (:P), and landed in the midst of WWII as a young American spy, standing in line to exchange codebooks full of fantastically incomprehensible symbols. I had not retained his memories, but I *had* retained my cellphone, and out of curiousity I fiddled on the way to the restroom. It fumbled for awhile... Soon I was surprised to find that fellow time-travellers/Nintendo fans had set up for themselves a small, free cellular network! o..O;

Another decent-looking boy, sensing I was new to this, offered to show me around... at least after I got a damn shave and some cutoff jeans, so I would be harder to recognize.
talarubi: (what is hope?)
Brownie points to anyone who can spot the dire problem:
typedef AsmParserRec* AsmParser;

int NewAsmParser(AsmParser* Parser, char* Input, int Length) {
  // Note: New() is like Pascal New, e.g. it modifies the supplied pointer.
  //   Hence pass-by-reference.
  if(New(Parser, sizeof(AsmParser))) {
    (*Parser)->Input     = Input;
    (*Parser)->Length    = Length;
    (*Parser)->Line      = 1;
    (*Parser)->Column    = 1;
  ...
}
Hey, I know. Almost nobody ever comments in here, so reply with the right guess, and I'll get you an LJ icon or something? 8)

This otherwise innocous snippet took up my morning bluescreening Win9x!! If I didn't have access to a box with a real OS I don't know what I'd be doing right now... But fortunately, GDB under WinXP correctly traps the problem even though it runs "fine" from the prompt. Code is happy now.

Is it surprising that the dumbest goofs are the most devastating? Eesh. x..X
talarubi: (Default)
Freaking class... so close.

I found out ICS was adding Accept and Content-Type to my HTTP PUT, thusly confusing LJ. Nixed that. Then I remembered to clear the header list between requests. Ethereal is really handy. Too bad the ever-buggy Kerio doesn't like it.

So the upshot is that now I have code uploading to FotoBilder, but for some reason the MD5s on the client/server end aren't matching up. Thus the request fails. Will have to investigate later. :/

Think I'll bring some descriptions along and try to draw between classes this evening.
talarubi: (the inscrutable starfish)
Apparently the caveat of growing up with video games is that you acquire their map systems.

Which is not so interesting in itself, but the damn place was dark! So here is my subconscious rendering FPS-esque scenery and a little edge map in the corner. In typical game fasion, it's almost no help at all. Actually I lied, the room I stumbled out into had some open sky. In typical dream fashion it wasn't nearly enough to see much BUT the sky, though I could see silhouettes of the surroundings, and precious little bits of highlight. And of course as I turned around it seemed to match the map.

Arrgh! Can you see the problem?

So here I am stumbling and bumping around trying to get a feel for the local layout, when my subconscious supposedly already has one! That just isn't bloody fair.

By the way, that branch was apparently off of my room-to-be. It seems, lacking better accomodations, we'd moved into a cave. o..O

Double BTW, this music has the best subtitle ever. ♥
talarubi: (yawn boring classes feh)
Paint program, as yet unnamed:
* Source compiled: 5425 lines.
* It loads and saves files now! Just JPEG, but adding new formats will be trivial.
* Accepts dropped files, too—format detected by content, not the file extension.
* The image view can be panned, rotated and zoomed; painting works just the same!
* Fuzzy/solid brush with variable settings (ala OpenCanvas watercolor).
* Dirty rectangle system, so even full-screen painting is fast.
* The underlying infrastructure is slowly becoming nontrivial (and useful).

Things supported by code but not quite implemented, or with no GUI:
* Antialiased lines, filled rectangles and complex filled polygons (polys still jaggy, ideas pending).
* Image cropping and resizing (just needs a dialog).
* Alpha-blending (for layers; but the brush also uses it).
* DirectX (faster but not integrated atm - low priority because it makes debugging horrendous)

Yet to do:
* Rewrite affine transformation - add blending, interpolation and supersampling. It'll be great for the image view, and later it could support a particle-based brush engine. (Also needed for small brush sizes.)
* GUI "sprite" layers - for selection overlays or other visual feedback
* Image layers
* Alternate blending modes, for the brush and for layers
* Tool system
* Pen/pencil tool (basically a sharper non-blending brush)
* Stroke smoothing (interpolate fast pen movement/rough mouse input)
* Image adjustments - levels, hue/sat, etc.
* Upload JPEGs to LiveJournal Scrapbook (or some other FTP)
* (How could I forget?) Networking support!!! Done right, this time. :P

And probably lots more I can't think of. But sleep now. *snores-..-*
talarubi: (mooooose!)
Now here's a video series I'd watch!

Nitrogen Triiodide Detonation (quicktime required)

...And some other excerpts, including several more pretty explosions. :D
talarubi: (16-bit dracus)
So I was poking around, grumping at the navigation, and wondered if I could print parts of the PHP manual. Hmm, I thought. Just how big is the thing? I grab the single-file HTML version, 10MB. Load in Firefox. Rattle talons.

Hmmmmm. FF's memusage shoots up at least 150mb. Bad sign. Print preview must be trying to use that much MORE, and thrashes so bad that it's allocating memory at modem speeds. It wasn't really going to finish. (Ed: It may have actually been a CPU issue, or even FF's allocator choking, I don't remember seeing a lot of disk activity... but that's anyone's guess.)

IE for once fares better, capping around 180mb--which is to say it actually finished. But for every page it seems to be touching all previous pages (disabling headers/footers speeds it up), leading to some alarming O(kn) runtimes! With the smallest font size and minimal margins, the manual, without annotations, comes to 2858 pages. The preview took about a half hour... by the end it had slowed to a >1sec/page crawl. o..o

Well so much for that idea. :) Things like this are an interesting comment on code scalability... a mere 10mb file becomes a problem when you use so much memory per tag that the internal representation is 15..20x larger. Since most of the document is plain text one must assume the tags are using hundreds of bytes, not 4chars*(15..20)=60..80! (While such files are unwieldy to be sure, I've wanted to edit them on occasion and found even Wordpad et al to have similar problems.)
Page generated Jul. 8th, 2025 03:16 pm
Powered by Dreamwidth Studios