Bespoke IDE for Julia desperately needed!

@compleat : What are your reasons for wanting to connect to a Linux machine from a Mac? A Mac should be perfectly capable of running Julia so that you can do your development, and I doubt that “production” runs on the Linux, provided it is so powerful that it is worthwhile, really need running it from an IDE.

1 Like

My Server has 64Gb of RAM and I am often using Machine Learning applications where I generate lots of data and sometimes run deep networks, etc. That said, my Mac does handle alot of it pretty well.

Another thing is that I tend to run into memory problems on my Mac even just running Firefox and Thunderbird at the same time, especially when Spotlight decides to re-index, so there often isn’t very much left for Julia - in that case, the external server helps alot. I did play with the VSCode remote access feature, which is handy. [I wish there were an easy way to just save everything in Julia between sessions, and that option would be more attractive -the equivalent of ‘save’ in MATLAB - not sure JLD/JLD2 works seamlessly for that]. Anyway, thanks for your comments.

The above, and in fact this whole topic, makes me wonder if you misunderstand the way open source works.

In most cases, while people are happy if someone finds the software they contributed to useful, very little thought is given to people who don’t. No one is selling a product. You can use it or not.

If you find something useful, ideally you contribute. Bug reports help, feature requests can be mildly useful, but it is important to realize that the developers of FOSS are not as distinct from the users as you seem to imagine. By making a feature request, you are mostly serving your own purposes (which is fine). Phrasing it as

is a curious way of looking at it.

8 Likes

That’s quite hard hitting.

I am a OS developer too. And I genuinely want more ppl using my products. Of course, I wouldn’t chase after every issue raised on Github. But I do appreciate ppl raising usability issues for me to consider. Again, if I don’t agree or I don’t have time i just leave it, cos I am not paid and it’s OS.

But at least we can be open to alternative thinking. Ppl use the word “tolerant” which I don’t like the connotation of. But a bit more “tolerance” is called for here, IMO.

7 Likes

Yeah, the amount of time it look JetBrain to release GoLand (which I believe was called Gogland initially) is astounding. It’s not a light effort. I highly appreciate Atom and VSCode extensions for Julia. I get to enjoy them for free! So I try my best to submit bug reports etc. It’s definittely not a “hand me down” feel!

3 Likes

Hi David,

I decided to try VSCode again on my Mac, with a view towards getting the remote feature going. I kept on getting
Julia Language server crashing

[I can’t make out whether this issue was ever resolved]

I guess I am jinxed :frowning:

Hi non-J

After failing miserably on everything else on here (on Linux), I am returning to this option, except it is not going well here, either.

I managed to install melpa and eglot-jl

Emacs is complaining about my adding (eglot-jl-init) to my .emacs file:

Warning (initialization): An error occurred while loading <my .emacs file> :

Symbol’s function definition is void: eglot-jl-init

Was that supposed to be added before or after
(package-initialize)
?

Thanks,

I think it needs to be after the call to package-initialize.

Note that if you just want an editor with syntax-highlighting and a repl, you can just install emacs packages julia-mode and either julia-repl or jupyter and not mess around with eglot at all. Eglot is just for rich IDE features mentioned in the eglot-jl readme.

2 Likes

I have gotten this far, I might try getting eglot going.

It seemed to work after moving that line in .emacs.

How do I start the repl now? [or how do I access eglot-jl readme?
I know I should know this, but please bear with me…]

For the repl you’ll need to install one of either the emacs packages jupyter or julia-repl using the same procedure you used to install eglot-jl. Probably julia-repl is the more well-trodden path at this point. See it’s README for usage instructions: GitHub - tpapp/julia-repl: Run an inferior Julia REPL in a terminal inside Emacs. You could also use the command builtin to julia-mode M-x run-julia, but the repl that gives you doesn’t have access to the various repl modes invoked by ], ?, and ;.

See the eglot-jl README at its github repo:

Hi. I tried adding those statements at the end, then at the beginning
of my .emacs file, and neither worked. Is there a special place they are supposed to go?

I refer to:

(add-to-list 'load-path path-to-julia-repl)
(require 'julia-repl)
(add-hook 'julia-mode-hook 'julia-repl-mode)

Or do I need to install something?

Thanks again.

You need to M-x package-install julia-repl. And then only the last two lines apply. The add-to-list command is for if you installed the package manually instead of using package-install.

I did exactly as you said. The install went OK, but afterwards when I tried to start emacs I got a warning saying it could not find julia-repl, so I re-added the
‘add-to’ line and included the path, but it still doesn’t work.

Here is my .emacs file:

(require 'package)
(setq default-frame-alist
(append default-frame-alist '((inhibit-double-buffering . t))))
(setq eglot-connect-timeout 120)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl “http” “https”)))
(when no-ssl (warn "
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:

  1. Install an Emacs version that does support SSL and be safe.
  2. Remove this warning from your init file so you won’t see it again."))
    (add-to-list 'package-archives (cons “melpa” (concat proto “://melpa.org/packages/”)) t)
    ;; Comment/uncomment this line to enable MELPA Stable if desired. See package-archive-priorities
    ;; and package-pinned-packages. Most users will not need or want to do this.
    ;;(add-to-list 'package-archives (cons “melpa-stable” (concat proto “://stable.melpa.org/packages/”)) t)
    )
    (add-to-list 'load-path “/home/davide/.emacs.d/elpa/julia-repl-20200310.1145”)
    (require 'julia-repl)
    (add-hook 'julia-mode-hook 'julia-repl-mode)

(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
'(package-selected-packages (quote (julia-repl eglot-jl))))
(eglot-jl-init)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
)

Thanks again.

You had several things out of order or not at the top level. I recommend reading through the init file section of the emacs manual

(require 'package)
(setq default-frame-alist
      (append default-frame-alist '((inhibit-double-buffering . t))))
(setq eglot-connect-timeout 120)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl “http” “https”)))
  (when no-ssl (warn "
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:

Install an Emacs version that does support SSL and be safe.
Remove this warning from your init file so you won’t see it again."))
  (add-to-list 'package-archives (cons “melpa” (concat proto “://melpa.org/packages/”)) t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See package-archive-priorities
;; and package-pinned-packages. Most users will not need or want to do this.
;;(add-to-list 'package-archives (cons “melpa-stable” (concat proto “://stable.melpa.org/packages/”)) t)
)
(package-initialize)

(require 'julia-repl)
(add-hook 'julia-mode-hook 'julia-repl-mode)

(eglot-jl-init)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won’t work right.
 '(package-selected-packages (quote (julia-repl eglot-jl))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won’t work right.
)
5 Likes

Works now!!! Great!!! Yay!!!

Thanks
It was really kind of you to guide me through that.

Actually - that was only the Julia-REPL.

When I try to start eglot it asks me for a file or location?
What do I put in for that? I tried the files in .emacs.d/elpa
but that didn’t work.

Glad things are mostly working for you.

Invoking eglot shouldn’t ask you for a file/location when invoking in a julia-mode buffer. Are you invoking M-x eglot in a buffer showing a .jl julia file? It won’t work in e.g. the REPL buffer. If you are invoking it in a buffer displaying a .jl julia file, what major mode does C-h m show the buffer is in?

I am edting a .jl file. Here is what it says:

[eglot] Sorry, couldn’t guess for `julia-mode’!
Enter program to execute (or :):

That sounds like (eglot-jl-init) isn’t running. Try invoking M-: (eglot-jl-init) and trying again.

Great. So it is working on Linux now.

As far as the Mac goes, I used the identical .emacs file you gave, and I can get julia mode, eglot, and the repl going but the ‘control’ commands for the REPL don’t work. Any ideas there?

Thanks again

No idea. I’ve literally never touched a Mac.