Comments (11)
Ok, I have fixed both the issue with the working directory (a13abfe), and the convention of showing an empty window on startup (86a4f70). Is that better?
from hyper-haskell.
Just stopping by to say thanks. The issue has indeed been resolved for me.
from hyper-haskell.
After starting up the backend and seeing the electron app running, have you tried using electron's file menu to open a worksheet?
from hyper-haskell.
On linux with electron 1.4.3 and 1.4.0, the app doesn't open at all in electron, i.e. no electron window with
just
karshan@karshan0:~/gits/hyper-haskell$ /home/karshan/node_modules/electron/dist/electron app
in the shell
I tried removing the devDependencies in package.json but it had no effect.
--- a/app/package.json
+++ b/app/package.json
@@ -1,8 +1,5 @@
{
"name" : "HyperHaskell",
"version" : "1.0.0",
- "main" : "src/main.js",
- "devDependencies" : {
- "electron-prebuilt" : "~1.4.0"
- }
+ "main" : "src/main.js"
}
Note: The sample electron app opens fine, suggesting this is not an issue with my electron installation.
from hyper-haskell.
@karshan Running
$ /home/karshan/node_modules/electron/dist/electron app/
from the hyper-haskell
directory should work on Linux as well, something is weird here. Can you post any error messages that appear or log messages that are left somewhere?
from hyper-haskell.
I have the same problem described by josefs and karshan, with Electron 1.4.3 from the Arch Linux official repositories. For some reason, however, make test
works, at least to the extent that the app window shows up correctly. (After make test
I am also having trouble with the backend not being started -- the app appears to not recognise that I am using stack, as some error messages mention ~/.cabal
-- but that is probably a separate issue.)
Edit: It seems the only relevant difference between make run
and make test
is that the latter adds a default file (Test.hhs
) to be loaded -- and indeed, if I change if(TESTING)
to if(true)
in the linked line make run
works as well (and loads Test.hhs
at startup). As for the stack/cabal issue I struck out in the paragraph above, it was merely a question of adjusting the path to the relevant stack.yaml
(as the paths in Test.hhs
happen to assume the working directory is worksheets
).
from hyper-haskell.
@duplode Nice! I think we're getting somewhere. Am I correct in assuming that once you were past the initial hurdles (opening Test.hhs
and changing the stack.yaml
path), evaluating expressions worked normally?
As for the stack/cabal issue I struck out in the paragraph above, it was merely a question of adjusting the path to the relevant stack.yaml (as the paths in Test.hhs happen to assume the working directory is worksheets).
That was not a mistake on your part, HyperHaskell was supposed to figure out that the working directory for evaluating the worksheet Test.hhs
is precisely the directory in which said worksheet is located. It turns out that I made an erroneous assumption: On macOS, every window can be associated with a filename (using setRepresentedFilename
), but this facility does not seem to exist on Linux.
I have the same problem described by josefs and karshan, with Electron 1.4.3 from the Arch Linux official repositories. For some reason, however, make test works, at least to the extent that the app window shows up correctly.
This may also be a platform convention mismatch. On macOS, whenever you start an application, it need not open any window. It is fine to just populate the global menu bar and wait for the user to do something with it. What is the convention on Linux? Should I open a new, unsaved document?
from hyper-haskell.
Am I correct in assuming that once you were past the initial hurdles (opening Test.hhs and changing the stack.yaml path), evaluating expressions worked normally?
It did -- reverse "Hello!"
followed by Ctrl+Enter makes "!olleH"
show up as expected.
This may also be a platform convention mismatch. On macOS, whenever you start an application, it need not open any window. It is fine to just populate the global menu bar and wait for the user to do something with it. What is the convention on Linux? Should I open a new, unsaved document?
Yes, I think so. Not all programs do that (some open a blank, document-less window, while others ask the user what they want to do), but opening a new unsaved worksheet would be entirely unsurprising and comfortable behaviour.
from hyper-haskell.
@HeinrichApfelmus It works out of the box now :-) I had to fumble a bit with the paths before getting a blank worksheet to work, but that is probably because I hadn't read the installation overview in the readme with the due attention. (I will let you know if I remain with any lingering doubts after doing so.)
from hyper-haskell.
Ok, sounds like it's fixed! But do feel free to reopen this issue at any time if your experience suggests otherwise.
from hyper-haskell.
Huh. I still have this same issue! Running Linux. make ELECTRON=$(which electron) test
produces a new X11 window. But make ELECTRON=$(which electron) run
does not produce a window.
I also don't get an interpreter to run unless I change directory: cd app; TESTING=1 electron .
. And then the interpreter can't find the Test.hss
unless that directory is worksheets. This is my best attempt yet:
(cd worksheets && TESTING=y electron ../app)
It starts a window and loads Test.hss. But even then it can't run any of that code because GHCI can't find any modules, even symbols like +
and $
are not defined. :(
WontCompile [GhcError {errMsg = "<interactive>:2:1: Not in scope: `Hyper.displayIO'"},GhcError {errMsg = "<interactive>:3:1: Not in scope: `hello'"},GhcError {errMsg = "<interactive>:5:38: Not in scope: type constructor or class `IO'"},GhcError {errMsg = "<interactive>:5:41:\n Not in scope: type constructor or class `Graphic'"}]
from hyper-haskell.
Related Issues (20)
- "Quit" doesn't HOT 1
- Cell evaluation fails when done too early after opening HOT 2
- Installation/running on linux HOT 3
- Automated HTML rendering of notebooks HOT 2
- Can't run interpreter with my GHC setup HOT 7
- MacOS: "Error: 1" using stack back-end HOT 2
- Does HyperHaskell work with Plotly? HOT 1
- reference to 'acceptNewSock' undefined HOT 1
- Support qualified imports with module aliases
- Use annotated Haskell modules as notebook format HOT 1
- instances Display List, Tuples ... HOT 5
- Hyper.html should take a Blaze.Html type as input
- Hyper.Graphics should be an alias for a Blaze.Html type HOT 1
- Ctrl-Return in "Module Imports" should reload imports
- Configuration of font size HOT 1
- Embedded GHC interpreter cannot find any modules or symbols HOT 2
- Paths on Mac? HOT 8
- Scaling (via diagrams) doesn't work
- Too strict version bounds on QuickCheck for hyper-extra HOT 1
- Upgrade electron beyond 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyper-haskell.