Unvanquished esoteric programming

Discuss whatever you'd like!
User avatar
killing time
Posts: 92
Joined: Wed Jul 04, 2012 7:55 am UTC

Unvanquished esoteric programming

Postby killing time » Fri Feb 06, 2015 9:09 am UTC

Recently pondering the collection of curious console commands which have been implemented in our beloved game beginning with the heritage of Tremfusion, I came to the insight that they make an amusing esoteric programming language. The functionality is enough to be Turing-complete, but sufficiently small that it is not excessively easy to write a general program in. :cool: Compared to the most famous Turing tarpit, Brainfuck, Unvanquished has a much more humoristical set of primitives: rather than the humdrum subtraction of 1, or advance of the memory pointer, there are things like command scheduling and execution of strings.

In this vein, here is a line which defines a utility for sorting natural numbers in Unvanquished:

Code: Select all

alias sort "alias sort..._sort \"sort...foo \\\$sort...bar\\\$ -1; if \\\$sort...foo\\\$ > -1 \\\"/delay \\\$sort...foo\\\$01 echo \\\$sort...foo\\\$;alias sort...\\\$sort...foo\\\$ set sort...bar;sort...\\\$sort...bar\\\$;unalias sort...\\\$sort...foo\\\$;sort..._sort\\\" \\\"unalias sort..._sort\\\"\";set sort...foo;delay 8 sort..._sort;set sort...bar"

It should be used with a space-separated list of nonnegative integers like thus:

Code: Select all

/sort 12 16 14 23 15 4 7 9 0 13 11

Please share your own in-game script creations :granger: :firebomb: :thumbup: !
User avatar
Project Head
Posts: 1138
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Unvanquished esoteric programming

Postby Ishq » Sat Feb 07, 2015 10:16 am UTC

Wow...This is actually quite impressive, although it looks like a sleep sort

Return to “Off-topic”

Who is online

Users browsing this forum: No registered users and 5 guests