In which a lost Earthling takes personal offense at the 'lost Age' trope of Suinel.
+ Show First Post
Total: 270
Posts Per Page:
Permalink

"What kind of do-what-I-mean interpreter is this that can't even handle a for loop, I swear," she grumbles, and tries again with a

int i = 0; while(i<5){this.out(new Light(Frequency f = (435+(75*i))THz, Duration d = 500ms, Shape s = new Shapes.sphere(r=5cm), Position p = position.fromVector(this.wand.toTip()*1.01), maxBrightness=60W));i++;}

Permalink

(Again, the light goes on once, for half a second, and then off.)

"It isn't totally that...  What's a for loop?"

Permalink

"How do you make a spell do the same thing multiple times?  ...Bloody hell, this is going to start getting into whatever nonsense reflection is, I can just tell.  That or Lisp."

function Make-A-Damn-Light(int i=0){this.out(new Light(Frequency f = 435+(75*i)THz, Duration d = 500ms, Shape s = const Sphere(radius r = 5cm), Position p = (this.wand.BasetoTip()*1.01).toPosition()));}

Make-A-Damn-Light(); Make-A-Damn-Light(1); Make-A-Damn-Light(3); Make-A-Damn-Light(5); Make-A-Damn-Light(1);

Permalink

(That doesn't work at all; nothing happens.)

"Oh, you're trying to define and repeat invocations!  You can't do that with freeform wand casting, I'm afraid - magic doesn't recognize that; you need to tell it what to do each time.  For invocations, you need to press it into crystal and invoke it from there.  That's how we run spellwagons and wards and so many other things.  Is that how your computers work too?"

Permalink

"Something like that.  Not really, but it's close enough for jazz, probably.  Hardware's not anything like my field of expertise, though, so, be warned.

"...let's see if the dread GOTO works, just to make absolutely sure..."

10 LET i = 0;

20 CREATE NEW LIGHT(FREQUENCY 435+(75*i)THz, DURATION 500ms, POSITION this.WAND.TO-TIP() AS POSITION, SHAPE SPHERE(5cm), MAX-BRIGHTNESS 60W);

21 IF i > 5 END; ELSE i++;

30 GOTO 20;

Permalink

Nope, it doesn't!  Once again, she gets one half-second light.  Then she feels some turbulence in the flow at the GOTO, but nothing else.

Permalink

"...Well, it got closer."

Permalink

"What's a 'goto'?  If you're telling the magic to go do the same thing again... that's the simplest sort of invocation, but still not freeform...  Now that I think about it, I wonder if Elves could do that?  I'll ask her sometime."

Permalink

"Why would Elves have specific abilities to tell magic to do things that humans cannot?"

Permalink

"Because they've got magic actually in their minds and bodies!  We need to invoke the magic outside ourselves through the interface of a wand; they don't.  They can get much finer control and understand more intuitively things that we need to learn and practice.  That's how there were so many separate schools in the Days of Wonder - or at least I think so, based on the legends we've got.  I haven't seen the Queen do anything totally impossible for us, but then I haven't seen her do much actual wand-work these days, even though she obviously likes it, so maybe...?"

Permalink

"...so, wait, doesn't the magic still come inside us a little bit, though?"

Permalink

"And...hmmm...I have a thought...because you can get magic to hold on to things..."

"What if I somehow compile the code into something that'll stick around long enough, and then invoke it by passing parameters via the metaphorical command-line?"

"Didn't really work when I tried just defining a function, buuuut I think it might be worth a shot..."

She refuses to let this crappy interpreter beat her!  She will have freestanding loops!

(Unless she definitively can't, but she hasn't yet run out of ideas!)

luxbuf init -size_of 400 -shape_of square -col_size 40

...no, that's not enough, that would be 400 bits, let's try that again...keep in mind the maximum wattage...

luxbuf init 3600 square red 80

luxc -from_string "method Create_Light(Vector v, Shape s, Color c){this.out(new Light(v, s, c, 500ms, 60W)); this.wait(500ms); return;}" | luxbuf

loop_unroll("for(int i = 0; i<5; i++){luxbuf.Create_Light(this.wand.pos*1.01, new Sphere(5cm), 435THz);}") | luxbuf

luxexec luxbuf

Permalink

"Yes it does, but it doesn't stay inside us, and we don't make it ourse -- what's that!?"

She's staring at the light in front of Mira's wand, and whips her own wand out to point at it.

Permalink

A square of glowing red light hangs in the air in front of Mira's wand.  And under it - between it and the wand - another red light blinks once, twice, thrice -

(Mira probably doesn't know to check, but Aeslin, to her shock, can see the magic flowing to the blinking light from the square not from the wand.)

- and then the square collapses and the blinking light vanishes.

Permalink

"You made a construct to - to take the place of a crystal?  A golem formed just of magic without any material parts at all!?"

Permalink

"That, dear Aeslin, was a buffer!  And a compiler!  And also a loop unroller, just in case!  So - what I did here is...

"Imagine that you have...instructions, for magic, like beads on a string.  And there's a bead you can hang on the string, that tells magic to make a string composed of these beads.

"And you take that bead, and the bead you hang on the string after it, is a bead that says 'cast this and keep it hanging around!'

"And that was the square.

"So I put the intent I use to create light with into that square.

"And then, because I'm an overachiever, I tried something even more bullshit, and actually managed to get the magic to -

"Alright, it's time to properly explain for loops!

"So for loops are pretty simple, semantically speaking; you have the 'for' token, an initializer section, a continue-until section, and the section where you actually do the loop - there's also usually a section for 'things you execute when the loop ends', but it's not necessary for this explanation even though I used it in my code.  And, here's a key thing, you don't actually need to write code that way.  You could write, say, if you wanted to make five lights, 'make light one, make light two, make light three, make light four, make light five' - but it's easier to think, 'for integer i =' - okay, programmers do a lot of zero-indexed ordered lists, it's just kind of a Thing - 'for integer i = 0, i less than 5, make light i, increment i'.  And that's where a compiler comes in: because it's a pain in the ass for computers to jump back and forth in the code they execute, compilers unroll loops and do a bunch of other stuff, so you can turn it into the 'make light one two three four five' of earlier.

"So, we start from the buffer.  I 'compile' approximately half an intent to make lights into that buffer; I compile, actually, a method to make lights that can vary.

"And then, I unrolled a loop like that example from earlier, except, in the middle, I read the buffer for my make-a-light intent, which I had set up as a part-of-a-spell so I could feed it values - and then I fed that back into the buffer, which I then executed!

"And then, it ran!  Take that, magic!  I have defeated your stupid arbitrary no-looping thing!"

Permalink

"You hung it in... just the magic in the air, and made it a charged crystal built from pure magic!  And then it evaporated when the magic ran out, of course, but I wonder if I could get it to stick around longer, and maybe even run it off a live oak or gopher tree without any crystal needed - and it could grow with the tree -

"- and if you can do logic like that loop can you do all sorts of other things as well like a golem -

"Oh wow, that'd almost be a fairy well right out of the Age of Wonders!"

Her eyes are gleaming.

She gestures with her own wand, and a red square of her own appears in the air.

Permalink

... But then nothing else happens.

Aeslin stares at it appraisingly.  "Is it just a mental block?  Or is there some trick to putting that intent into the square?"

Permalink

"I'm not sure; tell me what you did and how you did it.  What I did was something like..."

"...Actually, let me see if I can get it to show what it's doing."

"Or - if you've gotten the code into the buffer, maybe I can get it to..."

luxexec remote.Aeslin.luxbuf

Permalink

(She is, however, ready and willing to write down what she did, if that doesn't work.)

Permalink

(Her remote execution attempt doesn't do anything.)

Permalink

Once Mira's written down her code, Aeslin looks at it curiously.

"I almost want to say I don't speak this language!  For that matter, how do you speak our language, and how did you come here... but we can study that another time!

"So... think of the act of making the light as an object, and put that into the square and have it do that?  Is this how you normally work with your computers?"

Permalink

"You have no idea how bemused I am that I do - that I'm here, and y'all speak English, despite the vast divergence between our worlds - honestly.  But as far as the 'is this how programming works' thing...  Pretty much!  And honestly the square's just there to look pretty; the shape doesn't matter, only the data inside."

Permalink

"We speak what?  But really, I'm surprised you've got nonmagical 'computers' that somehow work in ways magic works even though we didn't know it!"

She holds out her wand again and twirls it in a slow spiral, as if she's filling in a shape on an imaginary piece of paper, trying to think of making a light as an object even while supplying magic to hold up the charged fully-magic crystal that is the light square...

And some magic goes out of the square, but then it collapses as her attention wavers.

Permalink

"We're speaking the same language.  Mine's English.

"Hhmmm.  Part of the reason I made this a buffer is that - a buffer, intrinsically, has the nature of holding a thing, such that - it looks like what happened just now is, you lost focus on it?

"And part of why I made this the way I did, with a visible thing holding the information, was because that way I could trick my brain into giving it object permanence with less focus on specifically what I was holding up - the magic was already flowing in such-and-such a way.  All it needed was keeping open the spigot.  So when you do the twirling...use that as your memory space.  Your memory palace, even; do you have those around here?  Never really learned it, but I could talk about the theory."

Total: 270
Posts Per Page: