Giter Site home page Giter Site logo

grin-compiler / haskell-code-spot Goto Github PK

View Code? Open in Web Editor NEW
107.0 11.0 3.0 6.67 MB

Visual tool to spot odd runtime behaviour of Haskell programs.

CSS 5.21% HTML 0.99% JavaScript 5.57% Haskell 13.34% Svelte 74.88%
haskell ghc profiler debugger visualization eventlog web-ui d3js

haskell-code-spot's Introduction

Haskell Code Spot

Visual tool to spot odd runtime behaviour of Haskell programs.
Keywords: data scientist, GHC eventlog, UI experiments, creative/live coding

NOTE: GHC-WPC is optional, Haskell Code Spot works with vanilla GHC eventlog out of the box.

Blog

Learn these for coding

Quick Start Guide

In one terminal:

$ (cd server && stack build && stack exec code-spot-server)

In another terminal:

$ (cd client/src && npm install && npm run dev)

Now open http://localhost:5000/ in your browser!

You will see a visualisation of data/grin.eventlog (change in client/src/App.svelte).

How to build your eventlog

If stack project is used, profiling must be enabled. After compiled with profiling, one need to run it with RTS options plh.

stack build --profile --executable-profiling --library-profiling
stack exec --profile EXECUTABLE -- ARGUMENTS +RTS -p -l -h

Previews:

This project is still in the proof-of-concept phase, but we had a great fun implementing the initial version of heap inspections and the step-by-step debugger. All of these features are based on visualizing the EventLog from GHC.

Heap Live

Heap Size

Cost Center based stack trace in step-by-step style. See the demo video.

haskell-code-spot's People

Contributors

andorp avatar buggymcbugfix avatar csabahruska avatar dredozubov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haskell-code-spot's Issues

code spot errors on ghcide

I followed the instructions and compiled then ran ghcide with:

stack build --profile --executable-profiling --library-profiling
stack exec --profile ghcide -- /tmp/blah/Bug.hs +RTS -p -l -h

I then changed the event log file, clicked fetch, and it seemed to load. Then a few seconds later:

101060
Error: <circle> attribute cx: Expected length, "NaN".

Perhaps a good enhancement would be for code spot to give up after some reasonable number like 50000 tries or so ๐Ÿ˜†

ghcideventlog.zip

Error on attempt to run NPM command in README

When I try to run the project using the quickstart instructions in the README, I get the following error:

> [email protected] dev
> rollup -c -w

[!] Error: Package subpath './compiler.js' is not defined by "exports" in /home/davidc/Downloads/haskell-code-spot/client/node_modules/svelte/package.json
Error: Package subpath './compiler.js' is not defined by "exports" in /home/davidc/Downloads/haskell-code-spot/client/node_modules/svelte/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/davidc/Downloads/haskell-code-spot/client/node_modules/rollup-plugin-svelte/index.js:11:4)

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.