Giter VIP home page Giter VIP logo

haskell-do's People

Contributors

codetriage-readme-bot avatar ddrone avatar exallium avatar javiertoledo avatar jfsagasti avatar juanjoman avatar kitfre avatar kubukoz avatar mamal72 avatar naldoco avatar ocramz avatar samuelschlesinger avatar shimuuar 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haskell-do's Issues

ZMQ Backend

This more of a post-it note, but as noted in #14, zmq offers another performant backend for message transport between server and frontend. This use case may only be needed in oscilloscopes and the like, but, hey, oscilloscopes are cool.

Removing dialog on close keeps Windows from killing process

Hey guys,

So HaskellDO exits properly now, as long as we keep that closing dialog box. But removing that dialog box causes the process to keep running after close, which is super bizarre. I've tried a bunch of things to no avail, so if anyone has any suggestions or wants to mess around with it please do!

Resolving this resolves #7

Edit: The dialog in question is in Main.js in gui/dist under mainWindow.on('close')

make build-all-linux fails

I'm still new to Haskell and Stack. I just tried to install this package following the instructions, but I got an error on make build-all-linux:

To install the correct GHC into /home/jluttine/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag. To use your system GHC installation, run "stack config set system-ghc --global true", or use the "--system-ghc" flag.

I tried stack setup:

stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

But I still get the original error after this. Any ideas what to do? I'm a bit lost here..

Make a Dockerfile for the app

It would be awesome to be able to have haskell.do in a docker container so a user could isolate all their environment.

Add a test suite

Right now we have no tests, which is awful ๐Ÿ˜“

We should have a test suite that runs on TravisCI (already setup)

Port PureScript + Electron to GHCJS

I think that Electron could be changed to a thin Haskell layer that just opens and closes system dialogs, the frontend would pass ADTs to the backend as actions to the backend process through a websocket, making the interconnection seamless.

Right now what we have is something like this:

current architecture

The thing with this is that we are duplicating responsibilities by having Electron and the Haskell core at the same time. Electron actually has two processes, a chromium renderer, which is the one that renders the PS site, and the NodeJS backend which is the one that spawns the Haskell core and interoperates with the current operating system. This shouldn't be hard to do with conditional compilation.

The ideal architecture would be:
ideal architecture

I imagine having something like the Elm architecture (which we currently have in the frontend) but for the whole application. The view would be in the GHCJS part, the update in the Haskell Core, and the appState would be in a common module that's shared between view and update along with implicit serialization/deserialization and sending.

I think this could be even a game changer for writing desktop apps in Haskell

Vim Keybindings

I would love it if the vim keybindings were available as at least an option. I've given this a look and its there on my fork, we just need to add one file which will make it work.

haskelldo-core: user error

mimi@argusek ~/haskell-do/core (master) $ stack exec haskelldo-core
haskelldo-core: user error (Pattern match failure in do expression at app/Main.hs:16:3-14)

Display instances

Raised this in gutter yesterday and am adding some notes here.

My basic thought was that it would be great to be able to define Display instances for types in the same way as one defines Show instances. Depending on how the architecture of HaskellDO evolves, I saw this effectively as compiling the instance to a JavaScript function (ghcjs) and embedding the js in the frontend. Some instances would probably need to take some form of state to update the rendered html/svg so that subsequent calls don't recompile the js on refresh.

Additionally, one could also define interfaces that would paramterize types like the mat lab functionality of creating inline sliders etc.

Make "error 64" after succesfully building OSX backend

haskelldo-core-0.1.0.0: copy/register
Installing executable(s) in
/Users/.../haskell-do/core/.stack-work/install/x86_64-osx/lts-7.14/8.0.1/bin
Completed 67 action(s).
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: *** [build-back-osx] Error 64

Can't open folder on start

When starting, file choosing dialog appears, but I'm able to choose only .hs files, not folders. Tried on latest version from git.
screenshot_20170317_220215

Build is failing on osx

How to reproduce:

  1. git clone https://github.com/theam/haskell-do $PROJECT_ROOT
  2. yarn global add bower pulp purescript
  3. cd $PROJECT_ROOT
  4. make build-all-osx

Now, a side note: the README does say to use npm to install global packages and I did install using yarn instead but I cannot see why this should make a difference. Here are the versions of packages that yarn installed globally:

Result:

It fails with the following output

bojan at vindicator in ~/src/haskell-do
> make build-all-osx
cd gui &&\
		npm run build &&\
		cd ..

> [email protected] build /Users/bojan/src/haskell-do/gui
> pulp build --to dist/compiled.js

* Building project in /Users/bojan/src/haskell-do/gui
psc: No files found using pattern: bower_components/purescript-*/src/**/*.purs
Compiling Console.Types
Compiling Columns.Types
Compiling Global.Effects
Compiling Cells.Types
Compiling Columns.Foreign
Compiling Bootstrap.Glyphicon
Compiling Bootstrap.TopFixedNavbar
Compiling BackendConnection.Types
Error 1 of 8:

  in module Global.Effects
  at /Users/bojan/src/haskell-do/gui/src/Global/Effects.purs line 3, column 1 - line 3, column 17

    Unknown module DOM


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 2 of 8:

  in module Console.Types
  at /Users/bojan/src/haskell-do/gui/src/Console/Types.purs line 6, column 1 - line 6, column 17

    Unknown module Data.Lens


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 3 of 8:

  in module Columns.Types
  at /Users/bojan/src/haskell-do/gui/src/Columns/Types.purs line 3, column 1 - line 3, column 15

    Unknown module Prelude


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 4 of 8:

  in module Columns.Foreign
  at /Users/bojan/src/haskell-do/gui/src/Columns/Foreign.purs line 5, column 1 - line 5, column 25

    Unknown module Control.Monad.Eff


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 5 of 8:

  in module Cells.Types
  at /Users/bojan/src/haskell-do/gui/src/Cells/Types.purs line 4, column 1 - line 4, column 21

    Unknown module Data.Argonaut


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 6 of 8:

  in module Bootstrap.TopFixedNavbar
  at /Users/bojan/src/haskell-do/gui/src/Bootstrap/TopFixedNavbar.purs line 3, column 1 - line 3, column 28

    Unknown module Prelude


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 7 of 8:

  in module Bootstrap.Glyphicon
  at /Users/bojan/src/haskell-do/gui/src/Bootstrap/Glyphicon.purs line 3, column 1 - line 3, column 17

    Unknown module Data.Show


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.

Error 8 of 8:

  in module BackendConnection.Types
  at /Users/bojan/src/haskell-do/gui/src/BackendConnection/Types.purs line 5, column 1 - line 5, column 17

    Unknown module Data.Lens


  See https://github.com/purescript/documentation/blob/master/errors/UnknownName.md for more information,
  or to contribute content related to this error.


* ERROR: Subcommand terminated with exit code 1

npm ERR! Darwin 16.4.0
npm ERR! argv "/Users/bojan/.node/versions/6.9.2/bin/node" "/Users/bojan/.node/versions/current/bin/npm" "run" "build"
npm ERR! node v6.9.2
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `pulp build --to dist/compiled.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'pulp build --to dist/compiled.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the haskell-do-gui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     pulp build --to dist/compiled.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs haskell-do-gui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls haskell-do-gui
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/bojan/src/haskell-do/gui/npm-debug.log
make: *** [build-front] Error 1```

Expected:

To build the project.

Hoogle Support

I think it would be quite nice to be able to use Hoogle for your local package database within the IDE without having access to the internet, as it would be a more realistic Hoogle database for you and it would be much more convenient than having to go to the online version and make sure the results you find are still relevant.

Package management

It would be nice to have an easy way of managing packages like you do in R:

install.packages("dplyr") would install the dplyr package.

In our end I think that we could have a dialog that asks for which package to install from the stackage version that the project is using. Then adds it to the cabal file.

stack path is hardcoded to be /usr/local/bin/stack

Hey,

I could not create a new Haskell.DO project, and by reading logs I found out that stack is assumed to be in /usr/local/bin/stack, while mine is somewhere else.

Steps to reproduce:

  1. Install stack anywhere except /usr/local/bin, e.g. ~/.local/bin
  2. Start haskell-do
  3. Try to create a new project
  4. It will fail silently (on the client-side) and print out a long indicating the command executed:
Executing: cd /some/path && /usr/local/bin/stack new do https://raw.githubusercontent.com/theam/stack-templates/master/haskell-do-new.hsfiles

(I'm working on a pull-request, setting up my environment right now ๐Ÿ˜ ๐Ÿ‘)
See #62

Remove the "connection closed" message

This is fairly straightforward by changing the call to simpleWebApp in Ulmus.hs for something like:

myInitialization port app = do
   node <- createNode "localhost" $ fromIntegral port
   keep' $ initWebApp node app
   return ()

Git commit on save

It would be nice to have a save button that automatically git commit s the latest changes with the date as the commit message

Not able to use repl when using external packages

I started working on a Kaggle problem with HaskellDO, but I wasn't able to get my code to compile (it is attached).

I've also attached the cabal and stack YAML files.

Lib.hs

-- # 1. Introduction
-- This is a direct port of the [Exploring survival on the titanic notebook](https://www.kaggle.com/mrisdal/titanic/exploring-survival-on-the-titanic) by Megan Risdal.
-- The intention of this is to have an example of what can be achieved with the data science tools we have in Haskell as for **February 27th, 2017**.

{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
module Lib where
             
import Control.Applicative
import qualified Control.Foldl as L
import qualified Data.Foldable as F
import Data.Proxy (Proxy(..))
import Lens.Family
import Frames
import Frames.CSV (readTableOpt, rowGen, RowGen(..))
import Pipes hiding (Proxy)
import qualified Pipes.Prelude as P
-- ## 1.1 Load and check data
-- We begin by loading our data from the `input/train.csv` file. `Frames` generates a data type in *compile time* for our CSV file.

tableTypes "Train" "input/train.csv"

Cabal file

name:                ex01-exploring-titanic
version:             0.1.0.0
-- synopsis:
-- description:
homepage:            https://github.com/githubuser/ex01-exploring-titanic#readme
license:             BSD3
license-file:        LICENSE
author:              Author name here
maintainer:          [email protected]
copyright:           2017 Author name here
category:            Web
build-type:          Simple
extra-source-files:  README.md
cabal-version:       >=1.10

library
  hs-source-dirs:      src
  build-depends:       base >= 4.7 && < 5
                     , Chart-diagrams
                     , Frames
                     , lens
                     , lens-family-core
                     , pipes
                     , foldl
  default-language:    Haskell2010

source-repository head
  type:     git
  location: https://github.com/githubuser/ex01-exploring-titanic

Stack.yaml

resolver: lts-8.3
packages:
- '.'
extra-deps: []

flags: {}

extra-package-dbs: []

Variable binding does not work in the REPL

  1. I declare a type in the editor
  2. bind a variable of that type in the REPL
  3. nothing happens: GHCi reloads same prompt as beginning of session:
Ok, modules loaded: Main.
*Main> *Main>

REPL is not working

There is just nothing. Also, there is no any useful output in terminal about the problem. Tried on latest version from git.

screenshot_20170317_224425

Console not working / empty

No idea if I'm just doing something wrong here but the console panel is just empty grey rectangle with nothing in it. I can click a mouse at the top of it to get an input text field there and I can write text there but nothing happens, no matter how many times I press Enter. In the README instructions, there's at least > symbol visible but I don't have even that. Any ideas?

Backend doesn't spawn on first opening

It seems like the backend can't spawn when I reboot my laptop and pc on first opening (ubuntu 16.04 and windows 10). The web socket is right the first time I execute the app but it doesn't show in haskell-do.

Build.hs file should utilize global stack values where possible

client-stack.yaml is hardcoded in line 56 and should instead append in the global value clientStackYaml instead.

This will make any changes involving the name of this file easier and help reduce possible future regressions. It also is a best practice and helps maintain consistency throughout the file.

Add required steps for installing GHCJS to documentation

Hi,

This line was required on my machine to install the correct GHCJS version, yet it doesn't appear in the documentation, I'm opening this issue to make sure this is actually the case and not a mistake on my part. ๐Ÿ˜

stack setup --stack-yaml client-stack.yaml

Websockets server needs to change

This is the note under "runServer", which we are currently using for our only backend, in the websockets package:

Provides a simple server. This function blocks forever. Note that this is merely provided for quick-and-dirty standalone applications, for real applications, you should use a real server.

Glue for using this package with real servers is provided by:

https://hackage.haskell.org/package/wai-websockets
https://hackage.haskell.org/package/websockets-snap

Clearly this is not what we should be using and thus I'm going to begin a fix on this presently.

Better project settings editor

Instead of having an ugly text editor, we could have keys and values, where the values are dropdowns or text inputs.

For dependencies we could even search on Stackage and autocomplete, on other fields we
could autocomplete with existing values (like default extensions).

Would be cool if it looked like this

Automatic build generation

Right now we have to go through the process of:

rm -rf .stack-work
stack Build.hs -a
cp -R static <dir-where-builds-go>
cp .stack-work/install/x86_64-osx/lts-8.3/8.0.2/haskell-do <dir-where-builds-go>

Repeat that process for OSX and Linux, and after that, zip and upload to Github releases.

It would be nice to automate this ๐Ÿ˜„

PDF Exporting

We need to be able to export PDF's using pandoc or something.

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.