Giter Site home page Giter Site logo

burlesque's Introduction

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 http://fmnssun.github.com/Burlesque.

If you don't know where to start read the TUTORIAL.md and try to learn from examples on anagol: http://golf.shinh.org/l.rb?blsq. If you need help you can also consult #esoteric on irc.freenode.net.

Compile

You need a decently recent ghc and haskell-plattform.

Install the required packages:

cabal install split  haskeline mtl regex-compat parsec digits statistics monadlist

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

Usage

  --file <path>           Read code from file (incl. STDIN)
  --file-no-stdin <path>  Read code from file (excl. STDIN)
  --no-stdin <code>       Read code from argv (excl. STDIN)
  --shell                 Start in shell mode
  --version               Print version info
  --compile <path>        Pseudo-compile file to haskell code
  --stdin <code>          Read code from argv (incl. STDIN)

Note: There needs to be a file "Prelude.blsq" in the working directory except if you're using the main_golf.hs version.

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 :) )

Contributing

I really welcome any help. However, for most of the things you'll need to know Haskell. If you know Haskell and wanna help: VERY GOOD, contact me! (PM, Push requests whatever, IRC).

If you don't know Haskell:

You can contribute userdefined builtins. If your builtin can be expressed using other builtins you can create a new builtin through the Prelude.blsq file. Just have a look at the file. I WILL ONLY ACCEPT SUCH BUILTINS IF YOU ALSO PROVIDE THE DOCUMENTATION FOR IT AS WELL AS TESTCASES! Thus, have a look at tests/ and runtests.py.

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.

burlesque's People

Contributors

fmnssun avatar bunnyocto avatar zhaw-munt avatar

Stargazers

lyxal avatar Corewala avatar Alex Globus avatar Andrew Carr avatar Galen Ivanov avatar Kamila Szewczyk avatar Ryan avatar Pierre Lauprêtre avatar Serge avatar Mtv Europe avatar  avatar jadon avatar Addison Crump avatar Sean Holden avatar

Watchers

 avatar James Cloos avatar

burlesque's Issues

Problem on Compile

The compiler fails on step 4 of 6 of the process:

[1 of 6] Compiling Burlesque.Helpers ( Burlesque/Helpers.hs, Burlesque/Helpers.o )
[2 of 6] Compiling Burlesque.Types  ( Burlesque/Types.hs, Burlesque/Types.o )
[3 of 6] Compiling Burlesque.Display ( Burlesque/Display.hs, Burlesque/Display.o )
[4 of 6] Compiling Burlesque.Parser ( Burlesque/Parser.hs, Burlesque/Parser.o )

Burlesque/Parser.hs:242:1:
    Non type-variable argument
      in the constraint: Text.Parsec.Prim.Stream
                           s Data.Functor.Identity.Identity t
    (Use FlexibleContexts to permit this)
    When checking that ‘runParserWithString’ has the inferred type
      runParserWithString :: forall s t.
                             Text.Parsec.Prim.Stream s Data.Functor.Identity.Identity t =>
                             Text.Parsec.Prim.Parsec s () [BlsqExp] -> s -> [BlsqExp]

Burlesque/Parser.hs:247:1:
    Non type-variable argument
      in the constraint: Text.Parsec.Prim.Stream
                           s Data.Functor.Identity.Identity t
    (Use FlexibleContexts to permit this)
    When checking that ‘runParserWithString'’ has the inferred type
      runParserWithString' :: forall s t.
                              Text.Parsec.Prim.Stream s Data.Functor.Identity.Identity t =>
                              Text.Parsec.Prim.Parsec s () BlsqExp -> s -> BlsqExp

[BUILTINS] New filter shortcuts.

FilterNth: Filter by nth element.
FilterHead: Filter by head.
FilterLast: Filter by last.
FilterFilter: Nested filter.
Mainly shortcuts for example for {1!!..}f[ and the like.

I/O Support

Burlesque should finally have support for I/O!

typo in TUTORIAL.md

"Burlesque treats 0 as false end everything else as false" should probably be "Burlesque treats 0 as false end everything else as true". If not, some more explanation in needed.

Compile failed MacOS

Hello! I'm trying to install and compilation fails, I'm too much of a Haskell novice to know where to look.

Burlesque/Eval.hs:27:1: error:
    Could not find module ‘Data.ByteString.UTF8’
    Perhaps you meant
      Data.ByteString.Char8 (from bytestring-0.10.8.2)
      Data.ByteString.Lazy (from bytestring-0.10.8.2)
      Data.ByteString (from bytestring-0.10.8.2)
    Use -v to see a list of the files searched for.
   |
27 | import qualified Data.ByteString.UTF8 as B8
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I'm using version 8.6.3 of ghc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.