Burlesque

Download as .zip Download as .tar.gz View on GitHub Blog

Burlesque

Burlesque is a concatenative, dynamic typed, lazy, probably esoteric programming language. Burlesque is a neat command line utility that can be used as a little desktop calculator, homework helper, to manipulate files, do some statistics or even some data analysis. It's also used as a language for code-golf. If a feature is missing you can let me know through a bug report. If you encounter a bug, incorrect documentation please also create a bug report.

blsq ) 1234 16j0 9rn.+4cosp
7 5 1 6
1 2 1 9
1 5 2 0
3 0 6 5
blsq ) 4ro)rosp
1
1 2
1 2 3
1 2 3 4
blsq ) "abc"su\[)**
{97 98 99 97 98 98 99 97 98 99}

Current stable version: 1.7.3 (used on anagol). Latest version: 1.7.4 (not on anagol). Also check out the BLOG/ directory of this repository, which contains Burlesque related blog posts.

Compile

You need a decently recent ghc and haskell-plattform.

Install the required packages:

cabal install split  haskeline mtl regex-compat parsec digits statistics

Then compile

ghc --make main.hs -o burlesque -O3 -fforce-recomp

If you just want the "--file" option (like on golf.shinh.org) use

ghc --make main_golf.hs -o blsq -O3 -fforce-recomp

Tests

With Burlesque 1.7.2f I added some little tests. However, it's too late to write a comprehensive testsuite. If you like you can fork this repo and add tests and send me a pull request. Whenever I solve a golf challenge I'll add my solution to the testsuite (once the challenge is post mortem of course :) )

License

Copyright (c) 2012, Roman Müntener All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.