packages feed

spade 0.1.0.7 → 0.1.0.8

raw patch · 8 files changed

+41/−24 lines, 8 files

Files

ChangeLog.md view
@@ -2,6 +2,12 @@  ## Unreleased +## 0.1.0.8++* Documentation and fix samples++## 0.1.0.7+ * Added directory iterator. * Make subscripted indexing work for strings and bytes. 
README.md view
@@ -33,21 +33,11 @@  ##### Run from a portable binary. -The easiest way to run spade on Linux is to download the portable executable-from [here](https://sras.me/releases).  The latest release will be named-`spade.run`.  After downloading the required  `.run` file, make it executable-and run it.--```-chmod +x spade.run-./spade.run-```--The file is a self extraction archive containing most of the shared dependencies, so it should-hopefully work on most of the linux distros.+TODO  #### From source + ##### Dependencies  To install depdendencies:@@ -58,10 +48,13 @@   apt-get install libtinfo-dev ``` -You can download the source package '.tar.gz' file from hackage, and 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.+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
samples/snake.spd view
@@ -58,7 +58,7 @@   if snake.direction == "down" then     let nextHeadPos.y = nextHeadPos.y + 8   endif-  let snake.segments = [nextHeadPos] + take(snake.segments, snakeLength - 1)+  let snake.segments = [nextHeadPos] + take(snakeLength - 1, snake.segments)   return snake endproc 
+ samples/spiral.spd view
@@ -0,0 +1,17 @@+graphics(true)+let screen_size = getwindowsize()+let radius = 600+let colors = [[255, 0, 0], [0, 255, 0], [0, 0, 255], [255, 255, 0], [0, 255, 255], [255, 0, 255]]+let ic = 0+loop +  if radius == 0 then break endif +  for i = 0 to 35+    let n = (mod(i + ic, 6) + 1)+    setcolor(colors[n][1], colors[n][2], colors[n][3])+    arc(screen_size.width/2, screen_size.height/2, radius, (i * 10), ((i * 10) + 10), true)+  endfor+  let radius = radius - 10+  let ic = ic + 1+endloop+render()+waitforkey()
spade.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           spade-version:        0.1.0.7+version:        0.1.0.8 synopsis:       A simple programming and debugging environment. description:    A simple weakly typed, dynamic, interpreted programming langauge and terminal IDE. category:       language, interpreter, ide@@ -43,6 +43,7 @@     samples/mandelbrot.spd     samples/paratrooper.spd     samples/snake.spd+    samples/spiral.spd  library   exposed-modules:
src/Interpreter/Lib/SDL.hs view
@@ -430,7 +430,7 @@ drawArc' x y radius f angles anglee = do   let start_angle = angles * 2 * pi / 360   let end_angle = anglee * 2 * pi / 360-  let one_degree = 2 * pi / 360+  let one_degree = (600/radius) * 2 * pi / 360 -- We use more segments as the arc gets bigger.   let angle_list = takeWhile (\a -> a <= end_angle) $ (DL.iterate' (+ one_degree) start_angle)   let dx = realToFrac x   let dy = realToFrac y
stack.yaml view
@@ -1,4 +1,4 @@-resolver: nightly-2021-12-18+resolver: nightly-2022-10-11 packages: - . extra-deps:
stack.yaml.lock view
@@ -76,7 +76,7 @@     hackage: strip-ansi-escape-0.1.0.0@sha256:08f2ed93b16086a837ec46eab7ce8d27cf39d47783caaeb818878ea33c2ff75f,1628 snapshots: - completed:-    size: 611690-    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2021/12/18.yaml-    sha256: d588b09b01c2b9ed1ea2880d70742f67c7ae775b3e032a44aa3beac8774fc99c-  original: nightly-2021-12-18+    size: 643623+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2022/10/11.yaml+    sha256: d3ba2e94c3ccbd3da4949243c83b59667c5eb9ffc7646148661c16741bbad1d4+  original: nightly-2022-10-11