Code Monkey home page Code Monkey logo

atom-julia-client's Introduction

Julia Client

Attention: We have decided to join forces with the Julia extension for VSCode. As such, this Atom-based plugin is effectively in “maintenance-only mode” and we expect to only work on bug fixes in the future.


Developer Chat Build Status Docs

This is the main repo for Juno, the Julia IDE. Please see here for installation instructions and report problems at the discussion board.

atom-julia-client's People

Contributors

andrewgibb avatar asbisen avatar aviatesk avatar blegat avatar bnewm0609 avatar daschw avatar davidanthoff avatar daviehh avatar dgleich avatar dpsanders avatar dustinrb avatar falobaid avatar jessebett avatar jkroso avatar jobjob avatar jonathan-laurent avatar karsten7 avatar mbeltagy avatar michaelhatherly avatar mikeinnes avatar milesfrain avatar mpastell avatar pfitzseb avatar sglyon avatar ssfrr avatar tbenst avatar tokkot avatar varanas avatar vdayanand avatar yonghee-kim 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

atom-julia-client's Issues

Toggling console on and off has wacky behavior

Check this out:

toggle_console_wacky

All I'm doing there is ctrl-BACKTICK many times. Notice that it swaps which pane the console is attached to (see the active cursor show up at the end of the highlighted line on the left pane every other time the console disappears). I think this is a problem with which becomes active when console pane is destroyed. I haven't dug into it yet to see if that is our problem or Atom's

Juno in a browser?

Newbie alert...

I'm watching the development of Juno2 with interest and fascination. After Viral recently mentioned Atom in the user groups, I started reading about Atom. I'm a big fan of web technologies, so I think Atom/Juno are super cool. My first thought when learning Atom was written in Javascript was, "Cool! It should be able to run in a browser!" That excitement quickly faded when I read that a web-based Atom editor was a non-starter because it wouldn't have access to the file system. However, with the communication developed here for use with Julia, access to the file system could be achieved via Julia.

Is it reasonable to have hope that Juno can be run from a browser, which would mean (I guess) stripping out the file system dependencies from Atom and use Julia for that instead?

Is that a Herculean effort or something a mortal like me (and my team) may possibly achieve?

I imagine a day where the browser is more like a desktop with app icons etc. I'd like to be able to double click a Juno icon on a web page (browser full screen to mimic a desktop) and have it pop up in a window all contained completely in the browser and completely in Javascript.

Here is a demo video I uploaded last year that illustrates what I'm talking about. The video is long (and a bit dry - sorry), but here are some highlights:

  • 0:40 - Simple blank "desktop" in the browser
  • 0:52 - A dream of using the browser's Javascript console as a Julia REPL (?)
    • Could some of the Coffee scripts in atom-julia-client be used to make this happen?
  • 2:28 - A basic window as a building block for web apps that are indistinguishable from desktop app.
    • This is where I would love to see Juno.
  • 3:30 - Dynamically adding callback functionality to SVG widgets
    • Note: There is not a single div in the entire demo. Everything is done on top of d3.js and SVG.
  • 4:20 - Demonstrating the correct behavior when windows overlap
  • 4:30 - Re-sizing windows.
  • 4:50 - Adding widgets to widgets. Everything nests properly.
  • 5:20 - Textbox callbacks (pure SVG and JS via d3.js)
  • 5:30 - Dynamically adding callback functionality to textboxes

Since I made that demo video, I built a charting library on top of d3.js to go with it and I would love to be able to run Juno in a browser together with my charting library. Maybe it is wishful thinking (?) :)

Uncaught SyntaxError: Unexpected end of input

This seems to happen whenever I move the cursor inside my file, or really try to do much of anything.

I set a breakpoint in tcp.coffee:12 in the buffer method, and it looks like the data coming back over the socket was:
"[20,{"inactive":false,"sub":"AudioIO","subInactive":true,"main":"Main"}]"

I stepped through the code:

      lines = str.split '\n'
      buffer[0] += lines.shift()
      buffer.push lines...
      while buffer.length > 1
        f buffer.shift()

and after buffer[0] += lines.shift() it looks like buffer is a 9-element array where the first element is the entire payload listed above, and then there are 8 empty strings. The first call to f buffer.shift() works fine but the 2nd one (where the first element of buffer is "") causes this exception. I think this is actually a result of a previous error which I'm digging into separately, and it seems that the buffer object is accumulating empty strings. I'll file an issue on that soon.

Atom Version: 1.0.11
System: Mac OS X 10.10.4
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught SyntaxError: Unexpected end of input

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Fsrussell%2F.julia%2Fv0.4%2FAudioIO%22%7D%5D%2C%22bootstrapScript%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.11%22%2C%22shellLoadTime%22%3A781%2C%22initialPaths%22%3A%5B%22%2FUsers%2Fsrussell%2F.julia%2Fv0.4%2FAudioIO%22%5D%7D:0

SyntaxError: Unexpected end of input
  at Object.parse (native)
  at /Users/srussell/dotfiles/.atom/packages/julia-client/lib/connection/tcp.coffee:36:27
  at Socket.<anonymous> (/Users/srussell/dotfiles/.atom/packages/julia-client/lib/connection/tcp.coffee:17:9)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:166:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:109:10)
  at TCP.onread (net.js:517:20)

Commands

     -3:41.6.0 vim-mode:activate-insert-mode (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -3:38.8.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -3:37.8.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
  9x -3:37 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -3:36.1.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -3:33.3.0 command-palette:toggle (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
  8x -3:25.5.0 core:move-down (atom-text-editor.editor.mini.is-focused)
  2x -3:16.8.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -3:15.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:15 julia-client:toggle-console (atom-text-editor.editor.vim-mode.normal-mode)
     -3:09.5.0 console:evaluate (atom-text-editor.editor.is-focused)
     -3:09.5.0 julia-client:start-julia (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
  2x -3:01.2.0 console:evaluate (atom-text-editor.editor.is-focused)
     -2:50.3.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
 10x -2:49.5.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:50.1.0 window:toggle-dev-tools (atom-text-editor.editor.vim-mode.normal-mode.is-focused)

Config

{
  "core": {},
  "julia-client": {
    "juliaPath": "/usr/local/bin/julia4"
  }
}

Installed Packages

# User
atom-yeoman, v0.3.13
autocomplete-bibtex, v0.6.1
autocomplete-clang, v0.8.7
autocomplete-julia, v0.1.0
build-tools, v3.7.0
ink, v0.1.1
json-schema, v0.1.13
julia-client, v0.1.2
language-cmake, v0.1.4
language-julia, v0.4.1
language-latex, v0.6.1
latex-completions, v0.3.0
linter, v1.5.0
markdown-preview-katex, v0.3.4
markdown-scroll-sync, v0.4.2
minimap, v4.13.2
pdf-view, v0.23.0
vim-mode, v0.59.0
vim-surround, v0.8.0
wordcount, v2.3.0
zentabs, v0.8.6

# Dev
No dev packages

"Powershell not spawned"

I get an error now (on master) saying "'powershell' could not be spawned. Is it installed on your path", with a sidebar opening with error

Window load time: 1219ms
events.js:141 Uncaught Error: spawn powershell ENOENT

write: broken pipe (EPIPE)

I get such error each time I execute commands such as println("hi"). I report this in case it is not a missing feature but an actual bug that affects me for some reason

bye,
Carlo

Feature request: use special comment lines to divide code into notebook-like cells

I love working in Jupyter but I miss a full fledged editor too many times.
On the other hand I'm also liking working in Atom+atom-julia-client but then I miss the custom block/cell code division.

I think the approach Matlab editor uses for solving this is a good trade-off.

Do you think it would be feasible to have a special comment line (e.g., ## this splits cells or #== this splits cells ==#) and a key shortcut to evaluate the cursor current cell?

Julia client internal error: non-boolean (Void) used in boolean context

Looks like it will be great -- terrific work as usual, @one-more-minute!

Just installed on Mac OSX Yosemite.
When I try inline evaluation, I get "Julia Client - Internal Error" as follows.
Evaluation on the Julia console seems to be working, though.

TypeError: non-boolean (Void) used in boolean context
 in filter! at ./array.jl:921
 in files at /Users/dsanders/.julia/v0.5/CodeTools/src/module.jl:18
 in jl_files at /Users/dsanders/.julia/v0.5/CodeTools/src/module.jl:28
 in find_include at /Users/dsanders/.julia/v0.5/CodeTools/src/module.jl:79
 in filemodule at /Users/dsanders/.julia/v0.5/CodeTools/src/module.jl:90
 in modulenames at /Users/dsanders/.julia/v0.5/Atom/src/eval.jl:8
 in anonymous at /Users/dsanders/.julia/v0.5/Atom/src/eval.jl:22
 [inlined code] from /Users/dsanders/.julia/v0.5/Atom/src/comm.jl:23
 in anonymous at task.jl:63

Julia version:

julia> versioninfo()
Julia Version 0.5.0-dev+63
Commit 4a2298d* (2015-09-12 22:48 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin14.3.0)
  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

uncluttered stacktraces

so atom-julia-clients internal functions aren't mentioned. IIRC we did have this in Juno/LT.

defaultTerminal not working on Linux

in julia-client.coffee there's a defaultTerminal property that seems to appropriately set the terminal based on platform, but when I look at my settings on Linux the terminal setting is set to the windows value.

I set a breakpoint in defaultTerminal and reloaded and it looks like process.platform is undefined while the package is loading? 😞

Plots not showing up

Evaluating in atom the lines

using Gadfly
plot(sin, 0, 1)

results in the last line returning a Plot object, but nothing is displayed in the browser. The same happens with PyPlot.

Is this a bug or a feature not implemented yet? In the latter case sorry for the noise.

Bye,
Carlo

Uncaught Error: spawn EACCES

  1. Installed atom binary
  2. Built Julia from the Master branch (that is v 0.4)
  3. installed Julia to a folder on my path
  4. Julia now works from the terminal, but atom's julia client cannot see it
  5. Specify the path to the executable in julia-client options '/Users/michael/Documents/github/julia/usr/bin'
  6. 'Toggle console', then write 2 + 2

Atom Version: 1.0.7
System: Mac OS X 10.10.5
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught Error: spawn EACCES

At child_process.js:1145

Error: spawn EACCES
  at exports._errnoException (util.js:734:11)
  at ChildProcess.spawn (child_process.js:1145:11)
  at Object.exports.spawn (child_process.js:977:9)
  at Object.module.exports.start (/Users/michael/.atom/packages/julia-client/lib/connection/process.coffee:12:21)
  at /Users/michael/.atom/packages/julia-client/lib/julia-client.coffee:82:40
  at Server.<anonymous> (/Users/michael/.atom/packages/julia-client/lib/connection/tcp.coffee:40:7)
  at Server.g (events.js:257:16)
  at emitNone (events.js:67:13)
  at Server.emit (events.js:163:7)
  at net.js:1192:12
  at process._tickCallback (node.js:357:13)

Commands

  3x -0:12.8.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:08.1.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:04.3.0 julia-client:toggle-console (atom-text-editor.editor)
     -0:00.8.0 console:evaluate (atom-text-editor.editor.is-focused)
     -0:00.8.0 julia-client:start-julia (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-solarized-light-syntax.theme-one-light-ui)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "solarized-light-syntax"
    ]
  },
  "julia-client": {
    "juliaPath": "/Users/michael/Documents/github/julia/usr/bin"
  }
}

Installed Packages

# User
color-picker, v2.0.11
ink, v0.1.1
julia-client, v0.1.2
language-julia, v0.4.1
language-r, v0.2.0

# Dev
No dev packages

ArgumentError: premature end of integer: ""

Is anyone else seeing this? I'm getting quite a few of these lately, can't really figure out what actions are causing them though:

ArgumentError: premature end of integer: ""
 in yieldto at task.jl:76
 in wait at task.jl:372
 in wait at task.jl:287
 in wait at task.jl:113
 [inlined code] from C:\Users\tew207\.julia\v0.4\Lazy\src\dynamic.jl:69
 in anonymous at C:\Users\tew207\.julia\v0.4\Atom\src\eval.jl:44
 in handlemsg at C:\Users\tew207\.julia\v0.4\Atom\src\comm.jl:63
 [inlined code] from C:\Users\tew207\.julia\v0.4\Atom\src\comm.jl:18
 in anonymous at task.jl:68

Uncaught TypeError: ed.getCursors is not a function

[Enter steps to reproduce below:]

  1. I don't know...

Atom Version: 1.2.0
System: Mac OS X 10.11.1
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught TypeError: ed.getCursors is not a function

At /Users/solver/Projects/julia-client/lib/modules.coffee:106

TypeError: ed.getCursors is not a function
    at Object.module.exports.update (/Users/solver/Projects/julia-client/lib/modules.coffee:106:24)
    at /Users/solver/Projects/julia-client/lib/modules.coffee:42:42

Commands

 10x -1:03.6.0 core:undo (atom-text-editor.editor.is-focused)
     -0:47.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:43.4.0 julia-client:kill-julia (atom-text-editor.editor.is-focused)
     -0:41.1.0 julia-client:evaluate (atom-text-editor.editor.is-focused)
     -0:41.1.0 julia-client:start-julia (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-light-syntax.theme-atom-light-ui.find-visible)
  3x -0:09.7.0 core:undo (atom-text-editor.editor.is-focused.autocomplete-active)
  2x -0:08.1.0 julia-client:toggle-console (atom-text-editor.editor.is-focused.autocomplete-active)
     -0:06.4.0 inline-results:clear-current (atom-text-editor.editor.is-focused)
     -0:06.4.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:06.4.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:03.2.0 inline-results:clear-current (atom-text-editor.editor.is-focused)
     -0:03.2.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:03.2.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:02.8.0 inline-results:clear-current (atom-text-editor.editor.is-focused)
     -0:02.8.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:02.8.0 core:cancel (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "atom-light-syntax"
    ]
  },
  "julia-client": {}
}

Installed Packages

# User
ink, v0.1.1
julia-client, v0.1.2
language-julia, v0.4.1
latex-completions, v0.3.0
minimap, v4.16.0
minimap-autohide, v0.10.1
number-slider, v1.0.1
project-manager, v2.6.5

# Dev
No dev packages

Default Path for writting .txt files when runing a script

Hey,

I've just switched to the old juno to the atom version (a little bit of work to make it work, but not that bad). It looks pretty cool.

I've launched a script that writes .txt files. if I call :

writedlm("myfile.txt", myarray)

Then my files are sent to the \Users\Lionel\Documents directory.
Don't you think it would be better to define the path relatively to the path of the script itsef, so it default to the script's directory ?

Just a thought ...
Thanks,
Lionel

copy button in inline results and errors

that copies the (lazy-loaded) plaintext output, ideally with expanded paths and stuff.
Bonus: Another button that copies the output in such a way that it can then be used as a valid input, e.g. eval Dict(:a => 1, :b => 2) and get exactly that back.

Scrolling of inline results

I've mentioned most of this in the Juno forum, but let me collect my observations here:

  • Result popups and autocomplete suggestions that would extend below the lower bound of the screen flicker back and forth at a speed that renders them unreadable; this seems to be an Atom issue brought up here.
  • Large matrices and vectors simply extend beyond the result popup, and it's not possible to scroll through them as in JunoLT:
    d07bbb39eeeb5bccfa9a9bad5c3ae16172481319_1_479x500
  • In the console, random newlines are added to print output (the following should appear on three lines, and does so when running the code from the REPL):
    39a72f493bbc4f0a3a5c67dc865cedb9c9455927
  • Some error messages get so long that they become unreadable (screengrab is from a screen with 1920 pixels width and fontsize 12, with the default Atom fontsize this message would extend beyond the length of the screen:
    error

Implement block finding in Atom

Currently julia-client calls out to Julia to do things like block finding – that is, determining the section of code to be evaluated when you try to evaluate, for example. However, this is pretty inefficient, involving sending the entire buffer to be parsed by Julia. Instead it would be good to use the existing information provided by Atom's syntax highlighting to scan over the current buffer and pull out blocks from CoffeeScript.

Cache the current file's module

When working with a large number of files (in Base Julia, for example) calling Julia to search for the current file's module causes a noticeable delay when evaluating and loading completions. We should cache the result and debounce the call to Julia so that it only happens, say, once every few seconds.

Error on start-julia or toggle-console with eval

ERROR: ArgumentError: Atom not found in path
  in require at ...
  in process_options at ...
  in _start at ...

Julia has stopped: 1, null

Any pointer on where to start debugging this? I have one working installation of julia-client, one not working...

@__FILE__ macro returns empty string when evaluated

I poked around the Julia internals a bit in an attempt to fix it myself, but I don't understand the problem well enough to make headway. current_task().storage returns a dict that has the following contents:

ObjectIdDict(
:bindings=>Dict{Any,Any}(Lazy.Binding{Any}(nothing)=>Atom.Editor()),
:SHOWNSET=>ObjectIdDict(#= circular reference =#=>true,#= circular reference =#=>true))

The @__FILE__ macro requires that the dict returns a value for :SOURCE_PATH, but I can't figure out where the dict is constructed or how the value for SOURCE_PATH would be determined.

Inline results should stay on the line where they were generated

If if I evaluate a an expression (with 'Cmd+Return'), get an inline result, and then push Return, the inline result goes to new line instead of sticking to the line that generated the result.

I presume this isn't intended, but please correct me if it is.

Console improvements

Here are some things I would like to see for the console

  • Better status indicator. Currently it blinks very slow making it hard to tell if it's actually running or not.
  • Disallow users to enter other commands when the console is running
  • Arrow keys for retrieving history (up key to call last command run)
  • Clear console by the standard julia command ctrl+l
  • Pretty format @show commands when running a script with Ctrl+shift+enter. It would be nice if @show x when x is a vector would output just like when you typed it directly in the console:
    image
  • Subtle iconography in the console. I find the huge icons and massive quote marks in the console distracting:

image

Make error display persistent

Currently, if you evaluate a whole buffer (with 'cmd+shift+return'), and an error occurs, it's displayed in the Atom non-modal dialogue which disappears after a few seconds. It would be nice if there was a way to keep the error message persistent so I can view it as a I debug the error.

Connect over SSH

It would be useful to be able to log in to remote servers and work with Julia processes there. This can be implemented fairly straightforwardly using remote port forwarding.

CCALL : import path not working properly to load externall dylib / dll

Hello,

I've been struggling with calling intel MKL with CCALL API. Everything is working in the console of julia v0.4 like this :

julia> function myasum(n::Integer, X::Vector{Float64}, incx::Integer)
         ccall((:cblas_dasum, :libmkl_rt),
               Float64,
               (Int64, Ptr{Float64}, Int64),
               n, X, incx)
       end
myasum (generic function with 1 method)

julia> myasum(3,[1.0,2.0,3.0],1)
6.0

But I could not make it in Juno, nor in Atom. My opinion is Juno and Atom doesn't get properly the path I defined in the DYLD_LIBRARY_PATH environment variable in my bash_profile. Indeed, if ii call ENV within julia v0.4 REPL I get the follwoing lines (remark the DYLD_LIBRARY_PATH is present) :

julia> ENV
Base.EnvHash with 24 entries:
  "TERM_PROGRAM"           => "Apple_Terminal"
  "SHELL"                  => "/bin/bash"
  "TERM"                   => "xterm-256color"
  "TMPDIR"                 => "/var/folders/fy/jvkfn7_136570b5t7b8d6cw00000gn/T…
  "Apple_PubSub_Socket_Re => "/private/tmp/com.apple.launchd.hMeo2BJQRj/Render"
  "TERM_PROGRAM_VERSION"   => "343.7"
  "TERM_SESSION_ID"        => "7440B6FA-C53F-4D79-AC27-A8320D0F4325"
  "USER"                   => "Lionel"
  "SSH_AUTH_SOCK"          => "/private/tmp/com.apple.launchd.QeyIfg9coQ/Listen…
  "__CF_USER_TEXT_ENCODIN => "0x1F5:0x0:0x1"
  "PATH"                   => "/Applications/Julia-0.4.0.app/Contents/Resources…
  "PWD"                    => "/Users/Lionel"
  "LANG"                   => "fr_FR.UTF-8"
  "XPC_FLAGS"              => "0x0"
  "XPC_SERVICE_NAME"       => "0"
  "HOME"                   => "/Users/Lionel"
  "SHLVL"                  => "1"
  "DYLD_LIBRARY_PATH"      => ":/opt/intel/mkl/lib:/opt/intel/lib:/Users/Lionel
  "LOGNAME"                => "Lionel"
                          => 

But it's not the case when I call the same ENV in Atom or Juno IDE ...
I can push my variable it to the ENV list (see image bellow) but the problem is still there : the library libmkl_rt can not be loaded.

capture d ecran 2015-10-19 a 16 21 52

One more strange thing : I've tried to load the VML (par of intel MKL) julia Package. In the REPL everything is fine :

julia> VML.vml_get_mode()
ERROR: UndefVarError: VML not defined

julia> using VML

julia> VML.vml_get_mode()
0x00001a02

But in Atom I get a strange behaviour : I first try to load the package (which leads to the dll not found exception). When I try to load it a second time it looks like it's ok .... but in fact, it is not

capture d ecran 2015-10-19 a 16 36 54

Any advice to sort this out ?

Please, see : JuliaMath/IntelVectorMath.jl#3
And eventually : http://discuss.junolab.org/t/failed-to-load-intel-mkl-specificly-on-juno-with-ccall/392/5

Many thanks,
Lionel

atom-ink not listed as dependency

I tried adding the git URL in the dependencies section of package.json, and running "apm install", but that just put it in the node-modules subdirectory. I ended up just installing it directly into my packages directory manually. Not sure what the right package.json incantation is to get it to install it as a top-level package.

Uncaught TypeError: Arguments to path.join must be strings

[Enter steps to reproduce below:]
I completed the installation instruction described here: https://github.com/JunoLab/atom-julia-client/tree/master/manual

And have the following packages installed:
julia> Pkg.status()
1 required packages:

  • Atom 0.2.0
    11 additional packages:
  • CodeTools 0.2.0
  • Compat 0.7.7
  • FactCheck 0.4.1
  • Hiccup 0.0.1
  • JSON 0.5.0
  • JuliaParser 0.6.3+ master
  • LNR 0.0.2
  • Lazy 0.10.1
  • MacroTools 0.2.0
  • Media 0.1.1
  • Requires 0.2.1
  1. Start with a blank document.
  2. From command palette select Julia: Open Julia Home
  3. Similar errors occur when selecting: Julia: Open Startup File

Atom Version: 1.1.0
System: Microsoft Windows 10 Home
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught TypeError: Arguments to path.join must be strings

At path.js:190

TypeError: Arguments to path.join must be strings
    at f (path.js:190:13)
    at Object.filter (native)
    at Object.win32.join (path.js:195:38)
    at Object.module.exports.home (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/utils.coffee:14:19)
    at Object.module.exports.juliaHome (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/utils.coffee:16:44)
    at atom-workspace.subs.add.atom.commands.add.julia:open-julia-home (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/utils.coffee:62:51)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:243:29)
    at C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:159:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)

Commands

     -2:39.2.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -2:34.2.0 julia-client:start-julia (atom-text-editor.editor)
     -0:09.5.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:04.7.0 julia:open-julia-home (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-dark-syntax"
    ]
  },
  "julia-client": {}
}

Installed Packages

# User
ink, v0.1.1
julia-client, v0.1.2
language-julia, v0.4.1
latex-completions, v0.3.0

# Dev
No dev packages

Mac Osx Capitan and DYLD_LIBRARY_PATH

Hello,

I've just uprgaded my mac to Capitan and encountered the following problem with julia in atom :
The DYLD_LIBRARY_PATH variables I put in my bash profile are not passed to atom when launched from the command line.

Apparently, the problem is known HERE but it's not clear to me what to expect. It's problematic for me since I need to call Intel MKL via the VML package.

Everything works fine from the Julia REPL :

julia> ENV
Base.EnvHash with 24 entries:
  "TERM_PROGRAM"           => "Apple_Terminal"
  "SHELL"                  => "/bin/bash"
  "TERM"                   => "xterm-256color"
  "TMPDIR"                 => "/var/folders/kb/grlwvdw10dd1dzmxlzf8brs00000gn/T…
  "Apple_PubSub_Socket_Re => "/private/tmp/com.apple.launchd.oWCHp1Wv0M/Render"
  "TERM_PROGRAM_VERSION"   => "361"
  "TERM_SESSION_ID"        => "D112AD4B-469E-4F61-98FB-773096ED9EC0"
  "USER"                   => "Lionel"
  "SSH_AUTH_SOCK"          => "/private/tmp/com.apple.launchd.PEdsYSfXyl/Listen…
  "__CF_USER_TEXT_ENCODIN => "0x1F5:0x0:0x1"
  "PATH"                   => "/Applications/Julia-0.4.1.app/Contents/Resources…
  "PWD"                    => "/Users/Lionel"
  "LANG"                   => "fr_FR.UTF-8"
  "XPC_FLAGS"              => "0x0"
  "XPC_SERVICE_NAME"       => "0"
  "HOME"                   => "/Users/Lionel"
  "SHLVL"                  => "1"
  "DYLD_LIBRARY_PATH"      => ":/opt/intel/mkl/lib:/opt/intel/lib"
  "LOGNAME"                => "Lionel"
  ⋮                        => ⋮

But in Atom I don't get my DYLD_LIBRARY_PATH :
capture d ecran 2015-11-21 a 18 21 47

Any idea how to make this work ?
Thanks,
Lionel

My bash profile :

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/intel/mkl/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/intel/lib

Julia kernel closes during initial startup

Here is the log when I try to start Julia, by evaluating a line consisting of just "1". Every time it said "Julia has stopped" I had to re-evaluate the line to start bootup. Eventually it got there.

Julia
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/Media.ji for module Media.
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/Requires.ji for module Requires.
Julia has stopped: 1, null
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/Hiccup.ji for module Hiccup.
Julia has stopped: 1, null
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/CodeTools.ji for module CodeTools.
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/LNR.ji for module LNR.
Julia has stopped: 1, null
INFO: Recompiling stale cache file /Users/solver/.julia/lib/v0.4/JuliaParser.ji for module JuliaParser.

Output gives "write: broken pip (EPIPE)"

Evaluating versioninfo() gives a long error message (which I can't copy and paste). Here are some relevant lines:

write: broken pip (EPIPE)
in yieldto at /Applications.../julia/sys.dylib
in wait at /Applications.../julia/sys.dylib
in stream_wait at /Applications.../julia/sys.dylib
in uv_write at stream.jl:952
...
in versioninfo at interactiveutil.jl:153 (repeats 2 times)
in include_string at .../v0.4/CodeTools/src/eval.jl:32
in include_string at .../v0.4/CodeTools/src/eval.jl:36
[inlined code] from  .../v0.4/Atom/src/eval.jl:37
in anonymous at task.jl:63

This is in julia-0.4.0-rc1 and Atom 1.0.11 on OS X

Can't checkout Atom/Codetools

I'm probably being dense here, but:

julia> Pkg.checkout("http://github.com/JunoLab/Atom.jl")
ERROR: http://github.com/JunoLab/Atom.jl is not a git repo

julia> Pkg.checkout("Atom")
ERROR: Atom is dirty, bailing

How can I get the latest fixes?

atom GUI hangs when showing large inline result

Great work so far on Atom Juno! I've been trying to switch over to it from LightTable, but there is one issue that's been stopping me. When a large dictionary/vector is returned as an inline result, the GUI takes a very long time to load it. Perhaps there needs to be some sort of truncation.

d = Dict()
for i = 1:10000   # 100000 will really stall
  d[i] = i
end
d      # looping the dict is fast, but getting the inline result is much slower

# also hangs with a vector
v = Array(Int, 0)
for i = 1:20000
  push!(v, i)
end
v    # this line will take about 12 seconds to run

Uncaught TypeError: Cannot read property 'toggle' of undefined

I just installed Atom and followed the instructions on https://github.com/JunoLab/atom-julia-client/tree/master/manual. I have julia v0.4.0-rc2 running on my Windows 10.

The error message is "Uncaught TypeError: Cannot read property 'toggle' of undefined" when I run the Julia Client: Toggle Console command from Atom.

Atom Version: 1.0.15
System: Microsoft Windows 10 Home
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught TypeError: Cannot read property 'toggle' of undefined

At /C:/Users/Serge/.atom/packages/julia-client/lib/ui/console.coffee:71

TypeError: Cannot read property 'toggle' of undefined
  at Object.module.exports.toggle (C:\Users\Serge\.atom\packages\julia-client\lib\ui\console.coffee:36:16)
  at C:\Users\Serge\.atom\packages\julia-client\lib\julia-client.coffee:83:58
  at Object.module.exports.JuliaClient.withInk (C:\Users\Serge\.atom\packages\julia-client\lib\julia-client.coffee:106:7)
  at atom-workspace.subs.add.atom.commands.add.julia-client:toggle-console (C:\Users\Serge\.atom\packages\julia-client\lib\julia-client.coffee:83:42)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\src\command-registry.js:245:29)
  at C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\src\command-registry.js:3:61
  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:159:32)
  at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
  at space-pen-li.<anonymous> (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:139:19)
  at HTMLOListElement.jQuery.event.dispatch (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
  at HTMLOListElement.elemData.handle (C:\Users\Serge\AppData\Local\atom\app-1.0.15\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)

Commands

     -1:12.7.0 core:delete (atom-text-editor#julia-client.juliaPath.editor.mini.is-focused)
  3x -1:03.9.0 core:backspace (atom-text-editor#julia-client.juliaPath.editor.mini.is-focused)
     -1:01.1.0 editor:consolidate-selections (atom-text-editor#julia-client.juliaPath.editor.mini.is-focused)
     -1:01.1.0 core:cancel (atom-text-editor#julia-client.juliaPath.editor.mini.is-focused)
     -0:52.1.0 command-palette:toggle (atom-text-editor#julia-client.juliaArguments.editor.mini.is-focused)
  9x -0:49.2.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:43.9.0 julia-client:toggle-console (atom-text-editor#julia-client.juliaArguments.editor.mini)
     -0:12.3.0 command-palette:toggle (div.settings-view.pane-item)
  5x -0:09.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:04.1.0 julia-client:toggle-console (div.settings-view.pane-item)

Config

{
  "core": {
    "projectHome": "C:\\\\Users\\Serge"
  },
  "julia-client": {
    "juliaPath": "C:\\\\Users\\\\Serge\\\\AppData\\\\Local\\\\Julia-0.4.0-rc2\\\\bin\\\\julia.exe"
  }
}

Installed Packages

# User
ink, v0.1.1
julia-client, v0.1.2
language-julia, v0.4.1

# Dev
No dev packages

Uncaught TypeError: _this.errorLines.lights.destroy is not a function

I think this happens when trying to eval some code after an error. Maybe has to do with the new error highlighting functionality?

Atom Version: 1.0.15
System: Mac OS X 10.10.4
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught TypeError: _this.errorLines.lights.destroy is not a function

At /Users/srussell/local/src/julia-client/lib/eval.coffee:55

TypeError: _this.errorLines.lights.destroy is not a function
  at Object.destroy (/Users/srussell/local/src/julia-client/lib/eval.coffee:55:28)
  at Object.module.exports.removeLines (/Users/srussell/local/src/ink/lib/editor/results.coffee:127:9)
  at Object.module.exports.show (/Users/srussell/local/src/ink/lib/editor/results.coffee:46:13)
  at Object.module.exports.showForRange (/Users/srussell/local/src/ink/lib/editor/results.coffee:71:15)
  at Object.module.exports.showForLines (/Users/srussell/local/src/ink/lib/editor/results.coffee:76:6)
  at Object.<anonymous> (/Users/srussell/local/src/julia-client/lib/eval.coffee:31:18)
  at Object.module.exports.input (/Users/srussell/local/src/julia-client/lib/connection/client.coffee:21:9)
  at /Users/srussell/local/src/julia-client/lib/connection/tcp.coffee:36:16
  at Socket.<anonymous> (/Users/srussell/local/src/julia-client/lib/connection/tcp.coffee:17:9)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:110:10)
  at TCP.onread (net.js:520:20)

Commands

     -0:40.2.0 julia-client:toggle-console (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
  3x -0:31.6.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:30.8.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:30.6.0 vim-mode:activate-linewise-visual-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:30.3.0 julia-client:evaluate (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
     -0:28.8.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
  2x -0:28 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:25 vim-mode:activate-linewise-visual-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:24.5.0 julia-client:evaluate (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
  5x -0:16.3.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:15.2.0 vim-mode:activate-linewise-visual-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:14.8.0 julia-client:evaluate (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
     -0:09.3.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.visual-mode)
  5x -0:08.9.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:07.6.0 vim-mode:activate-linewise-visual-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -0:07.3.0 julia-client:evaluate (atom-text-editor.editor.vim-mode.is-focused.visual-mode)

Config

{
  "core": {
    "excludeVcsIgnoredPaths": false
  },
  "julia-client": {
    "juliaPath": "/usr/local/bin/julia4",
    "juliaArguments": "-q --depwarn=error"
  }
}

Installed Packages

# User
atom-yeoman, v0.3.13
autocomplete-bibtex, v0.6.1
autocomplete-clang, v0.8.7
build-tools, v3.7.0
ink, v0.1.1
json-schema, v0.1.13
julia-client, v0.1.2
language-cmake, v0.1.4
language-julia, v0.4.1
language-latex, v0.6.1
latex-completions, v0.3.0
lcov-info, v0.10.4
linter, v1.5.1
markdown-preview-katex, v0.3.4
markdown-scroll-sync, v0.4.2
minimap, v4.13.3
pdf-view, v0.23.0
vim-mode, v0.60.0
vim-surround, v0.8.0
wordcount, v2.3.0
zentabs, v0.8.6

# Dev
No dev packages

Launching Julia fails silently unless you "Start a REPL"

If julia fails to launch when you try to execute code for the first time, or when you run the "Start Julia" command, it doesn't give any indication as to what's wrong.

If you run the "Start a REPL" command then you get useful debug output on the javascript console.

Atom v1.0.15 keeps freezing/crashing on Windows 10

Hi,

I am new to Atom and I just started to use it with Julia (packages language-julia, julia-client, ink). I have the version 1.0.15 installed on Windows 10. It runs fine a while but it keeps crashing when I run my Julia code always at the same place. I don't know if it is an issue with the packages or with Atom. How can I find out what causes the crash / freeze?

Thanks
Serge

Completions at console

It would be great to have completions at the console.

@one-more-minute, any idea why they don't work out of the box? We have the console grammar specified as source.julia and everything is properly scoped and highlighted. I feel like that should be enough to make it work.

Uncaught TypeError: Cannot read property 'getSelections' of undefined

julia> Pkg.status()
1 required packages:

  • Atom 0.2.0
    11 additional packages:
  • CodeTools 0.2.0
  • Compat 0.7.7
  • FactCheck 0.4.1
  • Hiccup 0.0.1
  • JSON 0.5.0
  • JuliaParser 0.6.3+ master
  • LNR 0.0.2
  • Lazy 0.10.1
  • MacroTools 0.2.0
  • Media 0.1.1
  • Requires 0.2.1

[Enter steps to reproduce below:]

  1. Start with a blank document
  2. Select: Julia Client: Toggle Console from command palette
  3. Select: Julia Client: Evaluate (Note that the cursor should be blinking in the the bottom frame and not the top frame which would usually contain the text.

Atom Version: 1.1.0
System: Microsoft Windows 10 Home
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught TypeError: Cannot read property 'getSelections' of undefined

At /C:/Users/szpakz/.atom/packages/julia-client/lib/eval.coffee:35

TypeError: Cannot read property 'getSelections' of undefined
    at Object.module.exports.eval (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/eval.coffee:24:5)
    at file:///C:/Users/szpakz/.atom/packages/julia-client/lib/julia-client.coffee:69:11
    at Object.module.exports.JuliaClient.withInk (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/julia-client.coffee:106:7)
    at atom-text-editor.subs.add.atom.commands.add.julia-client:evaluate (file:///C:/Users/szpakz/.atom/packages/julia-client/lib/julia-client.coffee:67:10)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:243:29)
    at C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\command-palette\lib\command-palette-view.js:159:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\node_modules\atom-space-pen-views\lib\select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\szpakz\AppData\Local\atom\app-1.1.0\resources\app.asar\src\command-registry.js:243:29)

Commands

     -0:34.8.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:34.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:33.5.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-light-ui)
  5x -0:31.6.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:30.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:30.2.0 julia-client:toggle-console (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-light-ui)
     -0:23 command-palette:toggle (atom-text-editor.editor.is-focused)
 18x -0:21 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:12 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:09.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:09.9.0 julia-client:reset-loading-indicator (atom-text-editor.editor)
     -0:08.3.0 command-palette:toggle (atom-text-editor.editor.is-focused)
  2x -0:06.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:04.4.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -0:04.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.1.0 julia-client:evaluate (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-dark-syntax"
    ]
  },
  "julia-client": {}
}

Installed Packages

# User
ink, v0.1.1
julia-client, v0.1.2
language-julia, v0.4.1
latex-completions, v0.3.0

# Dev
No dev packages

Undefined references are not properly displayed

In the REPL:

julia> Array(AbstractString,1)
1-element Array{AbstractString,1}:
 #undef

In Juno:

UndefRefError: access to undefined reference
 in yieldto at task.jl:71
 in wait at task.jl:371
 in wait at task.jl:286
 in wait at task.jl:108
 [inlined code] from C:\Users\tew207\.julia\v0.4\Lazy\src\dynamic.jl:69
 in anonymous at C:\Users\tew207\.julia\v0.4\Atom\src\eval.jl:50
 in handlemsg at C:\Users\tew207\.julia\v0.4\Atom\src\comm.jl:63
 [inlined code] from C:\Users\tew207\.julia\v0.4\Atom\src\comm.jl:18
 in anonymous at task.jl:63

This problem extends to any Array containing an #undef element.

Uncaught SyntaxError: Unexpected token [

To Reproduce:

  1. Open a Julia file in a fresh atom
  2. run the julia-client "toggle console" command
  3. type 1+1 in the console and press enter
  4. While that's chugging away move the cursor around a few times by clicking inside the Julia file
  5. Bang. Exception.

When I run that sequence with a breakpoint on tcp.coffee:12 I see the first time it's called everything is fine (at least it doesn't thrown an exception), but the 2nd time str ends up with the value

"[3,{"inactive":false,"sub":"AudioIO","subInactive":true,"main":"Main"}]["result",{"error":false,"result":"2"}]


[1,null]
"

So then lines ends up being a 5-element array with some empty strings and the first element had two JSON lists that aren't newline separated. At this point buffer still has the first element of "[2,{"inactive":false,"sub":"AudioIO","subInactive":true,"main":"Main"}]" (the last item that got put in there?) So when it hits the code buffer[0] += lines.shift(), the first element of the buffer actually ends up having 3 JSON lists smushed up against each other. Then when it tries to call f on that string (which tries to parse it) then it throws the exception, probably on the opening bracket of the 2nd smushed message.

So as far as I can tell there are 2 bugs here:

  1. We're getting malformed data over the TCP string, possibly from interleaved tasks on the Julia side (total guess)
  2. when the receiver task gets called on the Atom side, there is sometimes still data in the first element of the buffer, so the incoming data just gets appended to it

I think after the first exception gets called here, buffer is hosed and has empty strings in it, which is what then causes #18.

Atom Version: 1.0.11
System: Mac OS X 10.10.4
Thrown From: julia-client package, v0.1.2

Stack Trace

Uncaught SyntaxError: Unexpected token [

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html#%7B%22locationsToOpen%22%3A%5B%7B%22pathToOpen%22%3A%22%2FUsers%2Fsrussell%2F.julia%2Fv0.4%2FAudioIO%22%7D%5D%2C%22bootstrapScript%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%2Fsrc%2Fwindow-bootstrap.js%22%2C%22resourcePath%22%3A%22%2FApplications%2FAtom.app%2FContents%2FResources%2Fapp.asar%22%2C%22devMode%22%3Afalse%2C%22safeMode%22%3Afalse%2C%22appVersion%22%3A%221.0.11%22%2C%22shellLoadTime%22%3A984%2C%22initialPaths%22%3A%5B%22%2FUsers%2Fsrussell%2F.julia%2Fv0.4%2FAudioIO%22%5D%7D:1

SyntaxError: Unexpected token [
  at Object.parse (native)
  at /Users/srussell/dotfiles/.atom/packages/julia-client/lib/connection/tcp.coffee:36:27
  at Socket.<anonymous> (/Users/srussell/dotfiles/.atom/packages/julia-client/lib/connection/tcp.coffee:17:9)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:166:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:109:10)
  at TCP.onread (net.js:517:20)

Commands

     -0:27.1.0 command-palette:toggle (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
  6x -0:22.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:21.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:21.3.0 julia-client:toggle-console (atom-text-editor.editor.vim-mode.normal-mode)
     -0:16.9.0 console:evaluate (atom-text-editor.editor.is-focused)
     -0:16.9.0 julia-client:start-julia (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Config

{
  "core": {},
  "julia-client": {
    "juliaPath": "/usr/local/bin/julia4"
  }
}

Installed Packages

# User
atom-yeoman, v0.3.13
autocomplete-bibtex, v0.6.1
autocomplete-clang, v0.8.7
autocomplete-julia, v0.1.0
build-tools, v3.7.0
ink, v0.1.1
json-schema, v0.1.13
julia-client, v0.1.2
language-cmake, v0.1.4
language-julia, v0.4.1
language-latex, v0.6.1
latex-completions, v0.3.0
linter, v1.5.0
markdown-preview-katex, v0.3.4
markdown-scroll-sync, v0.4.2
minimap, v4.13.2
pdf-view, v0.23.0
vim-mode, v0.59.0
vim-surround, v0.8.0
wordcount, v2.3.0
zentabs, v0.8.6

# Dev
No dev packages

Tree-views for large results

Are other people seing this?

rand(1000) takes close to no time, rand(10000) takes substantially longer, while rand(100000) kills the editor for me (i.e. I get a couple of "Editor is not reacting, do you want to wait?" messages, but it doesn't recover).

When I evaluate e.g.

rand(100000)
1

so that the output being displayed is just 1, rather than the large vector, evaluation again happens instantaneously, suggesting that the large vector is causing the problem.

DOC: document how setting the current working module works

Sorry to post this here: I know this isn't ready for public consumption yet. My justification is that if I understand this, I can start using, and then I can start contributing :)

Anyway, I want to understand what setting the current working module does. Suppose I'm working on a package Lazy.jl. My current editor+terminal based workflow is to do something like this:

include(Pkg.dir("Lazy", "src", "Lazy.jl"))

the_number_2 = Lazy.cycle([1, 2, 3])[50]

# ... more code that always prefixes access to things in Lazy with `Lazy.`

# then make a change to something in the Lazy source
# so now I overwrite the module by doing another...
include(Pkg.dir("Lazy", "src", "Lazy.jl"))

# and now I can prefix with `Lazy.` and get the updated code from the new module definition

(I'm sure this is not the optimal way to do this, so tips for improving the workflow would be appreciated!)

I'm hoping that setting the current working module will allow me to not need to refresh the module with my include(Pkg.dir(...) hack. Is that true? If so, how does it work and how do we do things like refresh the module after a change?

Roadmap

I'd like to get started planning out where our IDE work will go over the next few months. There are a few things I'd particularly like to see happen:

  • Graphics and Plotting, including separate plotting pane
  • Error line highlighting and linking, as in LT
  • Linting
  • Console autocompletion
  • Single-keystroke access to docs
  • Integration between autocompletion and documentation (e.g. signatures and one-line summaries)
  • Integrated plotting

What else is high on people's priority lists? All suggestions are welcome, and if someone is willing to work on a feature I'm very happy to add it to the roadmap.

Very long one-line output overlays code

If you evaluate

"hellodvxcjlk;jlfds;gjsfl;kgjsfkljfgvkl;cxklxc;iofppfdiopgdffdipdidfopfddiopfifopdsifopiifopdsdsopfdiop"

in a small window it will overlay the code itself, making it uneditable

Can't copy output from console

(On Windows 10, Atom 1.0.18, Julia 0.4.0-rc2): it's possible to copy input lines from the console by right-clicking and selecting 'copy', but output lines cannot be copied by the same method. Neither input nor output lines can be copied or pasted using keyboard shortcuts.

Using right-click on an input line:
image

Using right-click on an output line:
image

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.