Installing Pluto.jl notebook for Julia language

 What is pluto.jl

TBD

How to install Julia?

Install Julia language from https://julialang.org/

Start Julia 
    I can do that from Terminal,
    or by clicking an icon
Once Julia's prompt opens,
    click the closing bracket ] to enter the "package mode"


How to Install pluto.jl?


Simply type 


(@v1.7) pkg> add Pluto.jl


The installation is very fast.

Press BACKSPACE to exit the package mode

 Type 



julia> using Pluto
julia> Pluto.run()

At this point, the pluto website should open in your browser:



How to execute Julia code in VS code editor with Julia Language Support plugin?

In VS code,

with the Julia Language Support plugin installed,

with Julia installed on my macOS,


% which julia
/Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia


 When trying to run (Shift-Enter, or RUN icon) Julia in VS code I got this error:



command 'language-julia.executableCodeBlockOrSelectionAndMove' not found



Solution

  • I reinstalled the VS code plugin
  • I rechecked the PATH (see above)
  • I CLOSED and RE-OPENED the VS code
And voila, it works. Not very scientific, but I am happy. 









References







How to add VS code executable to the command line on macOS?

 







% nano .zprofile

#### VS code - Uki 2022-06-26 ####
## set PATH to "code" executable so it is available directly from Terminal
export PATH="\$PATH:/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin"
## the following line is the key to launch "code" from the command line
alias code='/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron'




After adding these lines, save it in NANO by pressing 

control x 

Do not forget to double-check your work.

% cat .zprofile 

And re-run the content of the .zprofile: 

% . ~/.zprofile
 
 

How to add "julia" executable to the PATH on macOS

 





% nano .zprofile

#### Julia - Uki 2022-06-26 ####
## set PATH to "julia" executable so it is available directly from Terminal
export PATH="\$PATH:/Applications/Julia-1.7.app/Contents/Resources/julia/bin"

Make sure to change to the version of Julia you have, check the path.
After adding these lines, save it in NANO by pressing 

control x 



 Do not forget to double-check your work.

% cat .zprofile

Is .zprofile replacing .bash_profile in macOS?

 In the macOS 12+ (Monteray, etc.) the .zprofile is replacing .bash_profile

Embedding a GoogleDoc as a iframe in a BlogSpot.com post

Today, I decided to organize my writings, and since I find Google Docs the best way to compose, I was looking for a way to "PUBLISH" them in another way than ePubs.

Google Docs page has two options: to publish the whole document, hosted by docs, and EMBED the document on another website, in my case uki.BlogSpot.com




Embedding uses the <iframes> [horror music playing in the background].

The <iframes>, people have been hating them since the '90s, yet we are still using them.

I have spent an embarrassingly long time (ashamed to mention how long) trying every HTML attribute combination with width, height, <DIV>, and multiple JavaScript replacement and resize methods. 

All of them failed. 

Finally, I went back to my experience circa 1999  @ RollingStone.com and said, if everything else fails, put it in the TABLE grid and format the grid to your liking. It worked just how I wanted. 
 



I posted the solution on Stackoverflow.com as no one reads my blog: https://stackoverflow.com/a/72750122/6312771


<table width="100%" height="800px" border="0"> <tr> <td> <iframe src="https://docs.google.com/document/d/e/2PACX-1vTaRY68GO9FWHU8K64bqGUVD1V_FKxKqlpeeEBT44UZvwe_vi62hDh-yJM5bKPrDR6B-a96BeRTzejx/pub?embedded=true" frameborder="0" height="100%" width="100%"> </iframe> </td> </tr> </table>


Here is the result, please let me know if this helped you.


 

No more development on Turi Create

Since I have been using Apple's machine learning framework, Turi Create in the past,
today, I went to check if there is any new development and if there is support for Julia language. 

Unfortunately, it seems like it is a NO on both counts, there is a minimal code activity since the beginning of 2020, too bad.

https://github.com/apple/turicreate/graphs/code-frequency

Please let me know in the comments if you are still using it and what for.