spade: A simple programming and debugging environment.

[ gpl, ide, interpreter, language, library, program ] [ Propose Tags ] [ Report a vulnerability ]

A simple weakly typed, dynamic, interpreted programming langauge and terminal IDE.


[Skip to Readme]

Modules

  • Common
  • Compiler
    • Compiler.AST
      • Compiler.AST.Common
      • Compiler.AST.Expression
      • Compiler.AST.FunctionDef
      • Compiler.AST.FunctionStatement
      • Parser
        • Compiler.AST.Parser.Common
      • Compiler.AST.Program
    • Compiler.Lexer
      • Compiler.Lexer.Comments
      • Compiler.Lexer.Delimeters
      • Compiler.Lexer.Identifiers
      • Compiler.Lexer.Keywords
      • Compiler.Lexer.Literals
      • Compiler.Lexer.Operators
      • Compiler.Lexer.Tokens
      • Compiler.Lexer.Whitespaces
    • Compiler.Parser
  • DiffRender
    • DiffRender.DiffRender
  • Highlighter
    • Highlighter.Highlighter
  • IDE
    • IDE.Common
    • IDE.Help
      • IDE.Help.Contents
      • IDE.Help.Parser
    • IDE.IDE
  • Interpreter
    • Interpreter.Common
    • Interpreter.Initialize
    • Interpreter.Interpreter
    • Lib
      • Interpreter.Lib.Concurrency
      • Interpreter.Lib.Crypto
      • Interpreter.Lib.FileSystem
      • Interpreter.Lib.Fonts
      • Interpreter.Lib.Math
      • Interpreter.Lib.Misc
      • Interpreter.Lib.SDL
      • Interpreter.Lib.String
  • Parser
    • Parser.Lib
    • Parser.Parser
  • Test
    • Test.Common
  • UI
    • UI.Chars
    • Terminal
      • UI.Terminal.IO
    • UI.Widgets
      • UI.Widgets.AutoComplete
      • UI.Widgets.BorderBox
      • UI.Widgets.Common
      • UI.Widgets.Editor
        • UI.Widgets.Editor.Cursor
      • UI.Widgets.Layout
      • UI.Widgets.LogWidget
      • UI.Widgets.MenuContainer
      • UI.Widgets.NullWidget
      • UI.Widgets.OutputContainer
      • Spade
        • UI.Widgets.Spade.Button
        • UI.Widgets.Spade.Input
        • UI.Widgets.Spade.Layout
        • UI.Widgets.Spade.RefLabel
        • UI.Widgets.Spade.Selector
        • UI.Widgets.Spade.TextContainer
        • UI.Widgets.Spade.TextLabel
      • UI.Widgets.TextContainer
      • UI.Widgets.TitledContainer
      • UI.Widgets.WatchWidget

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.1.0.7, 0.1.0.8, 0.1.0.9, 0.1.0.10 (info)
Change log ChangeLog.md
Dependencies aeson (>=2.1.2 && <2.2), ansi-terminal (>=0.11.5 && <0.12), base (>=4.16.3 && <4.17), bounded-queue (>=1.0.0 && <1.1), bytestring (>=0.11.3 && <0.12), constraints (>=0.13.4 && <0.14), containers (>=0.6.5 && <0.7), cryptonite (>=0.30 && <0.31), Decimal (>=0.5.2 && <0.6), deepseq (>=1.4.6 && <1.5), directory (>=1.3.6 && <1.4), exceptions (>=0.10.4 && <0.11), file-embed (>=0.0.15 && <0.1), filepath (>=1.4.2 && <1.5), hedgehog (>=1.2 && <1.3), hex-text (>=0.1.0 && <0.2), hspec (>=2.11.0 && <2.12), hspec-discover (>=2.11.1 && <2.12), hspec-hedgehog (>=0.0.1 && <0.1), memory (>=0.18.0 && <0.19), monad-loops (>=0.4.3 && <0.5), mtl (>=2.2.2 && <2.3), neat-interpolation (>=0.5.1 && <0.6), ordered-containers (>=0.2.3 && <0.3), process (>=1.6.13 && <1.7), random (>=1.2.1 && <1.3), regex-tdfa (>=1.3.2 && <1.4), scientific (>=0.3.7 && <0.4), sdl2 (>=2.5.5 && <2.6), sdl2-gfx (>=0.3.0 && <0.4), sdl2-mixer (>=1.2.0 && <1.3), sdl2-ttf (>=2.1.3 && <2.2), spade, stm (>=2.5.0 && <2.6), strip-ansi-escape (>=0.1.0 && <0.2), template-haskell (>=2.18.0 && <2.19), terminal (>=0.2.0 && <0.3), text (>=1.2.5 && <1.3), time (>=1.11.1 && <1.12), unix (>=2.7.2 && <2.8), unliftio (>=0.2.24 && <0.3), unliftio-core (>=0.2.1 && <0.3), unordered-containers (>=0.2.19 && <0.3), vector (>=0.13.0 && <0.14), WAVE (>=0.1.6 && <0.2), with-utf8 (>=1.0.2 && <1.1) [details]
License GPL-3.0-only
Copyright 2022 Sandeep.C.R
Author Sandeep.C.R
Maintainer sandeep@sras.me
Category language, interpreter, ide
Uploaded by sras at 2024-08-04T12:56:31Z
Distributions
Executables spade
Downloads 589 total (28 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-08-04 [all 2 reports]

Readme for spade-0.1.0.10

[back to package description]

S.P.A.D.E

S.P.A.D.E stands of Simple Programming And Debugging Environment.

It contains a simple programming language and a built-in Terminal based IDE.

The following is a small spade program that draws a bunch of random circles in red color, in an SDL window.

graphicswindow(400, 400, true)
setcolor(255, 0, 0)
for i = 1 to 100
  circle(random(10, 300), random(10, 300), random(10, 40))
endfor
render()

The entire language and function reference is available in the IDE in an easily searchable way. Press F1 or use the help menu to access it.

IDE Demo

Some short screen recordings of SPADE IDE and programs are listed below.

Hello world!

Draw a bunch of random circles

List all files in a directory

Paratrooper (game) clone attempt

Installing

Run from a portable binary.

If you are on Linux then you can,

  1. Download the appimage executable from here
  2. Make it executable using chmod +x spade.run
  3. Run it using command ./spade.run.

If you get an error mentioning a requirement for 'FUSE', you can extract the program from the app image and run it as shown below.

./spade.run --appimage-extract
./squashfs-root/AppRun

From source

To install depdendencies:

  apt-get install libsdl2-dev libsdl2-mixer-dev \
    libsdl2-ttf-dev \
    libsdl2-gfx-dev \
    libtinfo-dev

You will need the cabal tool. Once you have either of these, running cabal install spade will install it for you.

Or you can download the source package, '.tar.gz' file from hackage, and again use cabal or stack tool to build and install it. After extracting the source to a folder, running either of the following commands in the folder should build and install it.

cabal build && cabal install

stack build && stack install

Building on Raspberry PI

You should be able to install this in a Raspberry Pi 3 or later iterations. The following steps appear to work for a succesful build on a Raspberry Pi 3.

  1. Install GHC version 9.0.1 following steps described https://www.haskell.org/ghc/blog/20200515-ghc-on-arm.html
  2. Install stack tool using apt-get install haskell-stack
  3. Increase the swap space to 2GB, disable GUI by booting into terminal mode, and then build the program using stack build --system-ghc.

Depending on your setup, the initial build can take a very long time, like a couple of days.

Getting started

The program should be started by providing a file name. For example,

spade /tmp/temp.spd

If the file does not exist, it will be created on save. If it exist then contents will loaded into the editor.

Other than this are no provisions to select or open a file from within the IDE. The user is supposed to only work with a single file at one time.

To interpret a spade program without starting the IDE, you can use the run command.

spade run /tmp/temp.spd

Some sample programs should be available here

Will execute the program without opening the IDE.

Reporting bugs/issues

Please use the issue tracker here.