News for hackers. Stuff that matters.
Re:Test for lists in Cython by leephillips on Monday April 19, 2021 @08:46AM (#26862113)
The standard way to make a histogram in Julia is histogram(data)

Using the latest version (1.6 - although 1.6.1 just came out) the time to first plot is just a few seconds. After that, plotting in the REPL is instantaneous.

I probably don’t understand what you’re getting at when you speak of making frequent changes to code. REPL-based development in Julia is excellent, and there are Pluto notebooks as well.

Re:Test for lists in Cython by Gravityloss on Monday April 19, 2021 @09:19AM (#26862413)
The way I would like to work is to have the repl open on the left hand side of the screen and code editor (like Sublime text, I'm sure many use Vim) on the right hand side.

I would run the code in repl (just using up-arrow and enter), get some plot, modify the code in the editor, save it, and rerun it repl.

Repl is used for connecting inputs to the program, not for editing. Often times you want to develop some small program that is part of a bigger program. So you run the big program up to the point it calls the small program. Or you run with some mock data. Then you have all your inputs for the small program, so you can start iterating it. Run - observe - edit - run - observe - edit.

In Matlab this worked because it detected if the file had changed, and reloaded it. You didn't specifically have to call load("my_function.m") before every call to it. This means you can just lift code from the big program and iterate on it in repl.

Re:Test for lists in Cython by rsfern on Monday April 19, 2021 @09:38AM (#26862606)
Check out Revise.jl, it enables this workflow, and it’s awesome.

https://docs.julialang.org/en/v1/manual/workflow-tips/#Revis...

Re:Test for lists in Cython by leephillips on Monday April 19, 2021 @09:46AM (#26862693)
Also, my Julia REPL is in a term buffer in vim, and I communicate with it (in both directions) from my editing buffer using the vim-sendtowindow plugin.