theam / haskell-do Goto Github PK
View Code? Open in Web Editor NEW:pencil2: :bar_chart: - The Haskell code editor focused on interactive development.
License: Apache License 2.0
:pencil2: :bar_chart: - The Haskell code editor focused on interactive development.
License: Apache License 2.0
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.
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')
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..
It would be awesome to be able to have haskell.do in a docker container so a user could isolate all their environment.
Right now we have no tests, which is awful ๐
We should have a test suite that runs on TravisCI (already setup)
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:
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:
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
Is it possible to integrate this functionality into Visual Studio Code?
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.
If not, when executing from source, the user will get a 404
One could check so with environment variables or uname -s
.
We are not using SimpleMDE since a lot, so we should rename it.
As stack repl
doesn't allow :l
-ing modules that are exposed, when the module that we are working on is exposed it is not loaded.
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)
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.
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
How to reproduce:
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.
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.
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.
This would be addressed with #3 but just to have this as a reminder.
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:
/usr/local/bin
, e.g. ~/.local/bin
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
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 ()
It would be nice to have a save button that automatically git commit
s the latest changes with the date as the commit message
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.
-- # 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"
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
resolver: lts-8.3
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []
Ok, modules loaded: Main.
*Main> *Main>
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?
Right now, the user should press return when on the prompt to activate the console. Maybe we should just make it do so when pressing the toggle console button?
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.
Pinging @KitFreddura
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.
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
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.
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).
It would be nice to have a file explorer instead of that ugly text input we have ๐
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 ๐
We need to be able to export PDF's using pandoc
or something.
I think we should make use of this module in ghc-mod and do some generation of code based on a type: https://hackage.haskell.org/package/ghc-mod-5.7.0.0/docs/Language-Haskell-GhcMod-FillSig.html. This is a really valuable tool if you structure your types right.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.