This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
05:13 librasteve_ left
ng0177 It turned out to be as simple as starting "rlwrap rakudo". 06:45
On another note: which graphics library is recommend for beginners? 06:55
07:02 jgaz left
antononcube Depends what you want to do. 07:19
07:47 human-blip left, human-blip joined 07:53 dakkar joined
ng0177 a) plot a simple x,y chart and b) generate a GUI to input some x,y values 08:24
08:38 lizmat left 08:39 lizmat joined 09:57 stanrifkin joined
librasteve ng0177 I think anton is asleep … but if you take a look at his LLM / Data modules on raku.land several use charting DS3.js iirc in jupyter notebooks (which you can run in vscode / intellij) 10:38
ng0177 librasteve Using jupyter notebooks with a raku kernel is appealing. I work under Arch Linux. It may be difficult to get it to work as a beginner. (any advice, anton?) On DS3.js iirc (typo?) I have not been able to find anything on Raku Land. 11:06
11:33 librasteve_ joined 11:56 lizmat left 11:57 lizmat joined
librasteve rakuforprediction.wordpress.com/20...aku-set-1/ 12:11
on linux, you need to get jupyter running (usual python version) and then install the raku.land/zef:antononcube/Jupyter::Chatbook module ... should be pretty straightforward 12:13
timo i'm looking at the raku-jupyter-kernel repo. looks like the docker file wants to change from using the :daily tag (last pushed 2 years ago) to :latest (pushed earlier this year) 12:26
librasteve timo: there's a slighly odd dymanic around Jupyter::Kernal 12:27
timo i haven't tried it in a long while tbh, though i should try to use it a lot more 12:29
librasteve the original was written by Brian Duggan, but Anton has forked it as Jupyter::Chatbook ... my suggestion for this kind of infra thing would be to raise an issue on Jupyter::Kernel (bduggan) and to have Anton upstream that
timo well, anton has a little description why he decided to make a fork, among other things in order to do a lot of UX experimentation 12:32
librasteve looks 12:33
@antononcube I see you explanation of "why fork Jupyter::Kernel", my hope is that we can have an effective tech stack where I can get the same engine from vanilla Jupyter::Kernel and from Jupyter::Chatbook - of course Jupyter::Chatbook would have a lot of cool LLM goodies & UI stuff also so it may be a bit heavier, but well worth it for LLM use cases. 12:36
my proposal is that you make Jupyter::Kernel a dependency of Jupyter::Chatbook and then use the same engine that way, another option would be to make Jupyter::Kernel a github submodule of Jupyter::Chatbook ... 12:38
... I am not sure how timo's concern about the docker version would work if you do this, but it seems to me in the long term that could sve you the effort to make changes to the upstream code 12:39
timo the docker thing i'm worried about is just that the rakudo it gives you is very out of date 12:43
librasteve timo: minimum I suggest to raise an issue for this on Jupyter::Kernel 12:45
timo i was going to make a pull request :)
antononcube @librasteve Thank you for your input. I think those are good ideas. I think they would have been more applicable at beginning of the project. Right now “Jupyter::Chatbook” has refactoring that I cannot easily reconcile with “Jupyter::Kernel”. Note that those packages are not actively worked on. So, manual update of features — so far — has not been difficult for me.
librasteve brian is pretty good - but typical takes a few days to fix stuff
timo: even better ... looks like the fork is a fork ... I am confident anton is watching any PRs on Jupyter::Kernel and reapplying on Jupyter::Chatbook if appropriate ;-) 12:47
btw I use Jupyter::Chatbook all the time anyway ;-) 12:48
antononcube I think I look into “Jupyter::Kernel” repository: (i) when I see a new version of it published, (ii) every two-three months, regardless. 12:49
librasteve cool 12:50
timo ah, the Dockerfile in chatbook looks like it's already in a better shape than the one from jupyter::kernel anyway 12:51
antononcube I have to evaluate my TODO items for “Jupyter::Chatbook”. I think the biggest one is the streamlining of the additiona new types of cells. (How it is done in Python’s core Jupyter kernel code.) 12:53
ng0177 bash: jupyter-chatbook.raku: command not found (sorry for a true beginner's question, zef install Jupyter::Chatbook went through w/o problems) 12:57
cdn.discordapp.com/attachments/768...a792b&
timo right, it should tell you what you need to add to your path for that to be available, right? 13:00
so you'd want to follow the link to the documentation of Jupyter::Kernel 13:01
but maybe it would make sense for anton to steal that part of the documentation and just replicate it with the small change of the name of the script and module
it would say something similar to this: 1 bin/ script [jupyter-kernel.raku] installed to: 13:03
/usr/share/perl6/site/bin
ng0177 cube: ~/.raku/bin $ ./jupyter-chatbook.raku --generate-config I forgot the ./ 13:36
timo oh you were in the right folder already! 13:37
ng0177 but now running jupyter-notebook from $HOME ... 13:43
cdn.discordapp.com/attachments/768...e86e0&
timo OK, it really wants to be in the $PATH then 13:44
ng0177 That's it! Now, the question is how to load rakuforprediction.wordpress.com/20...aku-set-1/ 13:56
antononcube I think I provied a link to the notebook in that post... 14:04
... yes, I did. See here: github.com/antononcube/RakuForPred...et-1.ipynb 14:05
@ng0177 BTW, if you are using JupyterLab, the graphics output from "JavaScripdt::D3" won't work. (Or at least I do not know how to prime that notebook framework for that.) 14:06
There are two options, using: (i) "JavaScripdt::Google::Charts", or (ii) VS Code. 14:07
I really do not know is VS Code working at all on Linux, though...
ng0177 Appreciate. However, Graph is not found - needs to be installed but how? 14:25
timo it's a package called just Graph that you can install with zef 14:34
antononcube Do you mean the package "Graph"? Should be installable with zef install Graph.
timo look at the "showcased" bit at the top of that notebook file, it has links 14:35
looks like you also need Math::DistanceFunctions and more from that list
antononcube Also, "Graph" can use Graphviz DOT for visualization, which is very robust, working well across different Operating Systems. You just have to install dot , neato, etc. 14:36
ng0177 It reminds me of an virtual environment. How do know which packages need to be installed? 14:39
antononcube I am not sure are the packages here relevent for Arch-Linux: graphviz.org/download/ 14:40
I found this one too: archlinux.org/packages/extra/x86_64/graphviz/
@ng0177 Thanks for the ☕ !! 14:41
ng0177 just installed it and works! Next message is on "Data::Reshapers" should I install via zef "Data" and "Math"? 14:44
antononcube Usually, I take care of the codes in blog posts to have the complete list of packages. But since "Jupyter::Chatbook" pre-loads a lot of packages and can use custom initialization code, sometimes I omit some of packages used.
So, you are using the notebook, it seems. Again, in the notebooks I have not included the initialization code. You can run this shell script which is going to install all "data science" packages: 14:46
github.com/antononcube/RakuForPred...install.sh
A long list of packages, BTW...
I should have mentioned that script earlier. 14:47
ng0177 rakuforprediction.wordpress.com/20...aku-set-1/ works 90%. How to print the Notebook to pdf to upload here? 15:12
antononcube 🤔 15:17
Just attach the Jupyter notebook. 15:18
16:35 dakkar left 16:36 lizmat left 16:37 lizmat joined
ng0177 It should include the error messages, though... 17:10
antononcube Right -- please do. 17:12
If Discord does not let you upload ".ipynb" files, the zip that notebook first.
17:21 Guest6 joined 17:22 Andrew44 joined 17:41 Guest6 left 17:56 stanrifkin left
ng0177 cdn.discordapp.com/attachments/768...767c3& 18:07
antononcube Got it. I will into it after an hour or two... 18:13
@ng0177 I do not see anyting problematic when I opened that notebook. Can post a screenshot with the error messages you see? 19:09
20:20 Andrew44 left 21:12 librasteve_ left