Giter Club home page Giter Club logo

glance's People

Contributors

pel-daniel avatar rgleichman 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glance's Issues

support literate haskell

at the moment, when i run it on a literate haskell file it fails with

glance-exe: fromParseResult: Parse failed at [/home/noon/dev/literate-readme/README.lhs] (9:1): Parse error: #
CallStack (from HasCallStack):
  error, called at src/Language/Haskell/Exts/ParseMonad.hs:80:41 in haskell-src-exts-1.17.1-CHFwoWxepXQKBbAz4YNlQX:Language.Haskell.Exts.ParseMonad

might be nice to support literate haskell :)

Improve graph layout

Problem

Graphviz produces very spread out images when laying out medium to large functions. Please see this SVG image.
findParentsWithEdges.zip

Background

There are a few causes for the large layout.

  1. In the function doGraphLayout in app/Rendering.hs, the Graphviz node is set as a circle with a radius equal to the maximum height or width of the diagram. Since icon rotation happens after layout, using a large circle for the Graphviz node shape ensures that icons can be rotated without overlapping. However, this also means that the Graphviz node is much larger than the actual icon, especially for non-circular icons.
  2. Graphviz does not seem to do a good job at graph layout when the node sizes have a high degree of variation. If Graphviz can not find a layout without overlaps, it reverts to scaling up the size of the layout. This means that all edges become longer.

Possible Solutions

  1. Graphviz has many layout algorithms, and each algorithm has many parameters. It's possible a better choice of algorithm or parameters in app/Rendering.hs could improve things.
  2. Something that might help would the following: after getting the graph layout from Graphviz, iteratively rotate the icons and check for overlap. Keep scaling down the layout until there is overlap. This approach might help a bit, but would not fix the deeper problem of a bad layout.
  3. Create a better graph layout algorithm. Such an algorithm ideally would also incorporate node rotation with layout.

The current plan of action is to investigate solution #3, creating a better graph layout algorithm.

fail to install

Looks like a promising project but had troubles installing after stack build :glance-exe.
Using Ubuntu 20.04, Stack 2.7.3

linear                           > Installing library in /home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/lib/x86_64-linux-ghc-8.8.4/linear-1.21.3-CqLrHLH1FJI8zNjM7Fnk1w
linear                           > Registering library for linear-1.21.3..
Progress 127/147        

--  While building package haskell-gi-0.23.1 (scroll up to its section to see the error) using:
      /home/hud/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/pkgdb --libdir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/lib --bindir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/bin --datadir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/share --libexecdir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/libexec --sysconfdir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/etc --docdir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/doc/haskell-gi-0.23.1 --htmldir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/doc/haskell-gi-0.23.1 --haddockdir=/home/hud/.stack/snapshots/x86_64-linux-tinfo6/049412a74f7341233b6f5aa5a46fc04e234c5daf4cc67b57911791bf42ef2acf/8.8.4/doc/haskell-gi-0.23.1 --dependency=Cabal=Cabal-3.0.1.0 --dependency=ansi-terminal=ansi-terminal-0.10.3-9zJT3Osp5wTAaMBIHKdPu2 --dependency=attoparsec=attoparsec-0.13.2.4-AHmlmm44dvnKaiPmUJc2M1 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.1 --dependency=containers=containers-0.6.2.1 --dependency=directory=directory-1.3.6.0 --dependency=filepath=filepath-1.4.2.1 --dependency=haskell-gi-base=haskell-gi-base-0.23.0-8eZFmSUT7kd6BiSIiRePNX --dependency=mtl=mtl-2.2.2 --dependency=pretty-show=pretty-show-1.10-7q5amcqtFPNELOrR9L3gUm --dependency=process=process-1.6.9.0 --dependency=regex-tdfa=regex-tdfa-1.3.1.0-4a72PEc42IGJORTi63oOLR --dependency=safe=safe-0.3.19-LxDJURZu1921pHCEJqjvRE --dependency=text=text-1.2.4.0 --dependency=transformers=transformers-0.5.6.2 --dependency=xdg-basedir=xdg-basedir-0.2.2-LVv1BwILCJR4v8JryE8LvJ --dependency=xml-conduit=xml-conduit-1.9.0.0-I2LCqlxoj6q4Fw2bZ4mRaN --exact-configuration --ghc-option=-fhide-source-paths
    Process exited with code: ExitFailure 1

Display undo state

The number of events _asUndoPosition is behind relative to _asHistory should be displayed in the GUI, as well as the total length of _asHistory. This is so that users know how far back in history they are. The principle behind this is that all state should be visible.

Strange Exception

Hi there, glance throws the following:

glance-exe: evalPattern: No pattern in case for PBangPat (PVar (Ident "n"))
CallStack (from HasCallStack):
  error, called at app/Translate.hs:249:8 in main:Translate

on this code here

Add history and undo to the GUI

Child of Issue #11

This can be done by having all user interactions create events which are saved once executed. All actions have an undo action.

GUI

Make a GUI for Glance. The current approach is to use Cairo and GTK. The rendering could be in a separate process so that interacting and dragging nodes is not slowed down by rendering.

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.