Monday, April 02



FizzBuzz in Minx Template Language.

Admittedly it took me more than a couple of minutes, because (a) I'm at the office and keep getting interrupted, (b) MTL (need a cute name for it) doesn't have proper expressions or loops or even else, (c) there seems to be a bug when using the basic conditional statements with user variables, and (d) I forgot to link the demo folder to something with content, so it didn't actually do anything at first.

(via Coding Horror)

[topics count=100]
[inc i]
[calc.mod m3 var.i 3]
[calc.mod m5 var.i 5]
[if.eq var.m3 0]Fizz[/if.eq][if.eq var.m5 0]Buzz[/if.eq]
[ var.m3 0][ var.m5 1][var.i][/][/]

Takes about 55ms to run. 20ms of that is the SQL queries; 28ms is the processing of the topic entries; 2ms is fixed overhead per page; 5ms is the calculation and conditional tags. It has to execute 700 of those to generate the page, so they work out to around 7μs each - about 0.14 mips.

Posted by: Pixy Misa at 12:11 PM | Comments (1) | Add Comment | Trackbacks (Suck)
Post contains 141 words, total size 1 kb.

Hey, anyone got any viagra or cialis or socialists or free porn or lexapro or prozac or teen old ladies animals around here?
Hi Beth! You scored 1.5 out of 5 in the spam filter. smile

(Which can tell the difference between cialis and socialists...)

Posted by: Pixy Misa at Thursday, April 12 2007 08:18 AM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
45kb generated in CPU 0.0571, elapsed 1.422 seconds.
56 queries taking 1.3923 seconds, 340 records returned.
Powered by Minx 1.1.6c-pink.