Giter Club home page Giter Club logo

Comments (11)

HeinrichApfelmus avatar HeinrichApfelmus commented on June 25, 2024 2

@duplode

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.

josefs avatar josefs commented on June 25, 2024 1

Just stopping by to say thanks. The issue has indeed been resolved for me.

from hyper-haskell.

schell avatar schell commented on June 25, 2024

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.

karshan avatar karshan commented on June 25, 2024

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.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 25, 2024

@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.

duplode avatar duplode commented on June 25, 2024

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.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 25, 2024

@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.

duplode avatar duplode commented on June 25, 2024

@HeinrichApfelmus

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.

duplode avatar duplode commented on June 25, 2024

@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.

HeinrichApfelmus avatar HeinrichApfelmus commented on June 25, 2024

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.

afcady avatar afcady commented on June 25, 2024

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)

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.