Sublime Text 3: Worth a look!

Chin up xiaodai, tomorrow’s a new day, new tools. You’ll likely come up with an interesting hybrid tool usage model, and would be most interested if you’d pop back in once in a bit and share your findings!
Funny, this week was on a conference call with an old colleague who wanted to understand some of this space (data science w/ notebooks, Julia, etc., and maybe some maths as he was a physicist by training). Sublime was snappy, started there showing the REPL and interaction on both sides. Then opened a term and used REPL, then launched Jupyter notebook from there and showed how notebooks worked.
Then launched Atom to show another option, and it took quite a while to load, and then loaded system heavy enough for a bit that the conference call lagged for a moment. He commented and we just moved on, and I didn’t even bother to show VSCode.
But, on the flipside I read a thread yesterday about profiling code, and see the amazing tooling in Atom for that. Or watching Chris R in his package tutorial vid, and the snazzy stuff that Atom can do. Am hoping that when I’m ready to grow into that tool more, it will be more mature as well.
Have a good one.

Not sure if it’s just me but Revise doesn’t seem to work inside Juno for me. Juno is the most feature complete, and is meant to have good support for debugging. I love the @edit macro. But if everything takes longer to start then it’s a bit weird.

It should work.

I even added a Revise button in my Atom package to make using it easier.

@xiaodai Where is your issue with it? Please open up issues if you face anything.

I have never had any issues inside latest Atom + uber-juno, and it opens up very fast and gets ready to work as I showed in this post (Sublime Text 3: Worth a look!)

I have been using Sublime Text 3. The quality of life improvement for me is HUGE! I no longer get the very lethargic feel when running Julia code.

Compilation latency is still an issue, but not such a bad thing anymore!

3 Likes

Is there a way to let things like

using TableView
showtable(iris)

open up a browser instead?

It prints to the REPL which isn’t very useful

That’s GREAT @xiaodai! BTW, the Seti-UI theme matches the Atom environment, so if you are switching back and forth for things it may be a better experience.

Interesting idea, sort of a SendCode from the REPL out to HTML. So, started thinking about approach such as with a MarkDown file in one pane and a live HTML preview in the other (there are packages for this Send to Browser). Was thinking of instead of showtable going to STDOUT of the term, perhaps that can be redirected to a file, that in turn opens and is sent to a browser. But wait WAIT, there’s PrettyTables that now has HTML output and can be saved to HTML, so it might be a few step workflow that could be streamlined. Perhaps a job that watches a folder where the Julia HTML file is saved, which triggers a command to open the file in ST3, followed by a Preview in Browser?
See this comment by @Ronis_BR:

I was going to grab his example and try it but it’s a screenshot, but might have time later to try some more, will take a look. I already have HTML going to browser no problem.

1 Like

Actually on Julia 1.2

using Blink
w = Window()
body!(w, showtable(iris))

works.

It just didn’t work for me on Julia 1.3-rc4. But it’s kinda clunky as it needs to launch a browser. But works pretty well.

2 Likes

Revise doesn’t seem to work inside Juno for me:

You are not alone. I am experiencing the same issue on several Windows & Ubuntu PCs.

Putting this in my startup.jl helped

println("Running startup.jl")

println("using Revise")
atreplinit() do repl
    try
        @eval using Revise
        @async Revise.wait_steal_repl_backend()
    catch
    end
end

println("Finished running startup.jl")

@xiaodai, I tried that already with help of @pfitzseb :

https://discourse.julialang.org/t/revise-seems-not-triggered-in-juno-ide/30479/3

Julia gets crashed throwing EXCEPTION_ACCESS_VIOLATION.

For the time being, I will give up on Atom/Juno. Maybe it is time for me to try sublime text 3.
I just installed and it feels really fast indeed.

Hi @pontus!

Yes, PrettyTables now has HTML support and I will do my best to release a version with this support by this weekend. My “major” problem is to write a proper documentation and create the test cases.

Let me know if you need anything special inside this back-end. It is in early stage of development, thus we can make big changes before reaching a final, stable API :slight_smile:

1 Like

Sweet! @Ronis_BR, if you could perhaps paste the example code you provided in your recent announcement thread into a post there using the triple-backticks for code quoting, it would avoid retyping to test with what is already working for you at present capability level. I looked in your test files and through the source code, but could only find .png files (e.g. in /PrettyTables.jl/tree/master/docs/ assets /). Thanks!

Very nice! Will give this a look as well…

1 Like

It sounds we should make a proper Sublime Text plugin for Julia. Not sure if I have time to have a crack. Never done a Sublime Plugin before.

1 Like

Could you explain what you have in mind with a “plug-in”? What should it provide that is currently (in your opinion) missing?

Well. For a first I can just install it with package controller. Second, I like the @edit macro in Juno that takes me to the code in question.

Clicking on the code address in an error message takes me to the code.

A dataframes viewer.
The set up instructions is quite long and a plugin can automate it.

Pretty Tables didn’t used to support large tables? It needs the whole table to be loaded to RAM? Instead of fetching the just columns and rows it is viewing right?

Well, PrettyTables.jl prints tables (matrices, vectors, DataFrames, and anything that complies with Tables.jl API). Usually, all those entities are loaded into RAM. However, you can use something that fetch on demand, if it complies with Tables.jl, it will work. Notice that, to print a table (text mode), I really need to have access to all data that will be printed before printing. Otherwise it will be impossible to automatically compute the column size for example.

2 Likes

Thanks for the info. I use VS Code but I’m far from enamored with it and I’d love to find an IDE that I actually like :wink: I think I’ll give this a shot.

1 Like

Let us know how it went. If something is not up to snuff, perhaps we can fix it.

1 Like