diff --git a/content/Blog/dwitter_simple.rst b/content/Blog/dwitter_simple.rst index d921d71..8c76e4b 100644 --- a/content/Blog/dwitter_simple.rst +++ b/content/Blog/dwitter_simple.rst @@ -4,7 +4,14 @@ Two simple dweets :date: 2024-02-29 :authors: Matt Gibson -Computer graphics is full of wizardry but the demo scene is populated by arch-wizards. I tried my hand at a couple of dweets, which are tiny demos that fit in a tweet. + +.. raw:: HTML + + Crowds adoring jesus, a bit like my respect for graphics programmers. + + + +Computer graphics is full of wizardry but the demo scene is populated by arch-wizards. The community has some `very talented people `_ and there's lots to learn (`like ray marching and signed distance functions `_). I tried my hand at a couple of dweets, which are tiny demos that fit in a tweet. .. raw:: html @@ -18,7 +25,7 @@ This was from just playing around with the default dweet. It reminds me a bit of I'm more proud this, which does a simple display of the `Peter de Jong Attractors `_ as well as a couple of dwitter tricks including `unicode packing `_. This one reminds me of smoke monster from Lost. -The community has some `very talented people `_ and there's lots to learn (`like ray marching and signed distance functions `_) There's some very talented people there, I recommend having a look at +There's some very talented people there, I recommend having a look at - Frank Force (`dwitter `__ `personal `_) - Tom Reznik `dwitter `__ diff --git a/content/Blog/js_in_pelican.rst b/content/Blog/js_in_pelican.rst index 00fc94e..82be45e 100644 --- a/content/Blog/js_in_pelican.rst +++ b/content/Blog/js_in_pelican.rst @@ -6,6 +6,10 @@ Embedding js in pelican :authors: Matt Gibson :modified: 2024-04-04 +.. raw:: HTML + + The pelican + Sometimes I like to write a little js in my blog posts. Here is an example of how to embed a javascript file in a pelican article. diff --git a/content/Blog/jupyter_ecosystem.rst b/content/Blog/jupyter_ecosystem.rst index b8e9426..5bb5bb2 100644 --- a/content/Blog/jupyter_ecosystem.rst +++ b/content/Blog/jupyter_ecosystem.rst @@ -5,6 +5,10 @@ The Wild West of Jupyter :authors: Matt Gibson :modified: 2024-04-20 18:59 +.. raw:: HTML + + The abduction of Europa. Jupiter is the one with the horns. + There's some wacky stuff in the Jupyter ecosystem. Still, one thing that really stood out for me was the extension of Jupyter notebooks into web development and their interaction with the JavaScript ecosystem. So web assembly is a thing, and you can run C and Rust code inside little isolated JavaScript sandboxes instances, maybe even from `your CDN `_, so of course you want to compile `Python in WASM `_. Now you're wondering, didn't Jupyter do some fancy refactoring a while ago? I wonder if I can put a webserver up there, too... @@ -12,11 +16,11 @@ Behold `JupyterLite + Wow! Just what you always wanted: free notebook hosting! you can install packages, you can code, powered by this: diff --git a/content/Blog/python_interpreter.rst b/content/Blog/python_interpreter.rst index fed6096..6d29542 100644 --- a/content/Blog/python_interpreter.rst +++ b/content/Blog/python_interpreter.rst @@ -3,11 +3,17 @@ Exploring the CPython interpreter :date: 2015-06-26 :authors: Matt Gibson -:summary: Resources for exploring the CPython interpreter. -I enjoyed this quick introduction to the CPython intepreter. Worth watching if you'd like to know more about how CPython is implemented and what exactly the interpreter is doing. +.. raw:: HTML - + Don't lose your head trying to understand Python. -Could be followed up with `Link this dive `_ through the CPython intepreter by Prof Philip Guo, which I've started watching. It's nice to get a better understand of the tools you use everyday, and it makes me very curious about the structure of the other Python implementations: `Link PyPy `_, `Link Jython `_, `Link tinypy `_, `Link Skulpt `_, etc. + +I enjoyed this talk introduction by `Allison Kaptur `_ - "Bytes in the Machine" which provides easy but insightful introduction to the CPython intepreter. Worth watching if you'd like to know more about how CPython is implemented and what exactly the interpreter is doing. + +.. raw:: HTML + + + +Could be followed up with `this intro by Guido `_ or a `very long tour through the CPython interpreter `_ by Prof Philip Guo, which I've started watching. It's nice to get a better understand of the tools you use everyday, and it makes me very curious about the structure of the other Python implementations: `Link PyPy `_, `Link Jython `_, `Link tinypy `_, `Link Skulpt `_, etc. diff --git a/content/Blog/stable_django.rst b/content/Blog/stable_django.rst index eeaed9a..70ae2df 100644 --- a/content/Blog/stable_django.rst +++ b/content/Blog/stable_django.rst @@ -4,6 +4,11 @@ How good is Django? :date: 2024-03-31 :authors: Matt Gibson +.. raw:: HTML + + It's Django Reinhardt, not Django the web framework + + A brief riff on stable, mature tools. I've been playing around recently with a little project involving recommender systems. Anyway, for the website, I ended up reaching for `Django `_. Man, it's been over a year since I've done any Django projects, but I forgot how joy it is to use it. The documentation is excellent. The platform is pretty stable and very mature. There's a lot of useful packages and integrations: `DRF `_, `Celery `_, the `debug toolbar `_, `allauth `_, `wagtail `_, `haystack (for search) `_ etc etc. for It's just lovely, usable technology, and I feel old saying this, but I value that more and more. In my PhD, I had some unpleasant experiences with a rapidly changing landscape for software in AI and ML, and it made me value stability a whole lot more. Let us never talk about NVIDIA drivers on linux or nouveau. diff --git a/content/Blog/updating_website_thoughts.md b/content/Blog/updating_website_thoughts.md index 5d483ab..7f87aca 100644 --- a/content/Blog/updating_website_thoughts.md +++ b/content/Blog/updating_website_thoughts.md @@ -3,38 +3,41 @@ Date: 2024-01-15 Authors: Matt Gibson Modified: 2024-04-30 -[TableOfContents] +![The prodigal son, also reflecting.]({attach}../images/prodigal_son.png) +It's been a little while since I've updated my website. Here's some thoughts revisiting this older code. In particular I want to evaluate whether using Pelican has been worthwhile and record some answers to natural questions I had. -It's been a little while since I've updated my website. Here's some quick thoughts revisiting this older code. +[TableOfContents] # Pelican static website pros and cons Good: -* Pelican 👍: having software after not having used it for years is a welcome surprise. Especially given that I migrated from Python 2 to Python 3. -* static site generation 👍: Still handy. Handles a bunch of stuff website bureaucracy and whatnot I'd rather not be bothered with. +* 👍 Pelican: having software after not having used it for years is a welcome surprise. Especially given that I migrated from Python 2 to Python 3. +* 👍 static site generation: Still handy. Handles a bunch of stuff website bureaucracy and whatnot I'd rather not be bothered with. Bad: -* random css 👎: I don't have a great sense of aesthetics so I've typically relied on someone elses'. In practice, that means copying other people's designs and CSS. That CSS, however, has aged poorly. -* using git submodules 👎: my setup for deploying this site was convoluted -* rst 👎: sorry,like mercurial ReStructured text just hasn't had community adoption. -* cli-only 👎: I would probably update my website more if it was easier. This was not helped by keeping content in a separate repo +* 👎 random css: I don't have a great sense of aesthetics so I've typically relied on someone elses'. In practice, that means copying other people's designs and CSS. That CSS, however, has aged poorly. +* 👎 using git submodules: my setup for deploying this site was convoluted +* 👎 rst: sorry,like mercurial ReStructured text just hasn't had community adoption. +* 👎 cli-only: I would probably update my website more if it was easier. This was not helped by keeping content in a separate repo +Things which have made things nicer since then: +* using github actions to deploy # Answers to some common Pelican questions [updated: 2024-04-30] Because Pelican is configured to deliver a quick, out of the box blogging experience the documentation is a little more obscure if you want to go off the beaten path. In 2024, Pelican is not as hot as it was in 2015 when I started this site but it there is still a lot of example code slowly rotting on github. Blessedly, Pelican has been fairly stable so much of the old content is handy. -Apologies if none of these responses answer your question. They are mostly for me, so I remember how to do basic things. +Apologies if none of these responses answer your question. They are mostly for me, so I remember how to do basic things.(postscript 2024-04-30 19:45 -- After writing this earlier in the afternoon, I have already found it useful because I could look up how to embed an image lol) ## How do I set my homepage as markdown document? In brief, 1. create a page `index.md` with the following metadata -``` +``` markdown Title: Welcome to my homepage Save_as: index.html Template: homepage.html @@ -42,7 +45,7 @@ Template: homepage.html blah blah blah ``` -2. (optional) create a template `homepage.html`. You can reference `dates` and `page.content` so you could like to recent blog posts say +2. (optional) create a template `homepage.html`. You can reference `dates` and `page.content` so you could include recent blog posts like so: ``` {% extends "base.html" %} @@ -78,7 +81,7 @@ MENUITEMS = [ [[src](https://stackoverflow.com/a/59508010/1888465)] -**Comment**: I think maybe you run into a problem here because you have a page but you want an article context. You have to also decide what to do with `index.html` and the blog focus part of the website. +**Comment**: You have to also decide what to do with `index.html` and the blog focus part of the website. ## How do I suppress the autogenerate category pages? @@ -94,8 +97,8 @@ similarly for tags: TAG_SAVE_AS = "" ``` -Note: you have to render pairs. It seems like just doing one or the other won't work. -[src]() +Note: you have to render pairs. It seems like just doing one or the other won't work (maybe?) +[[src](https://stackoverflow.com/questions/31865312/how-do-i-force-pelican-to-suppress-generation-of-category-files)] another option is change ``` @@ -119,6 +122,7 @@ In brief, look at: - a more complex theme like [`flex`](https://github.com/alexandrevicenzi/Flex) or [`simplify`](https://github.com/vuquangtrong/simplify-theme) - config for an existing website e.g. for [simplify](https://github.com/vuquangtrong/simplify-theme/blob/master/build/pelicanconf.py) 3. it's also helpful to have high level understanding of the [pelican architecture](https://docs.getpelican.com/en/latest/report.html). +4. actually [this tutorial](https://www.thedigitalcatonline.com/blog/2021/03/25/how-to-write-a-pelican-theme-for-your-static-website/) is pretty good too Consult these as required: @@ -149,7 +153,7 @@ $$ $$ [Link to the plugin here](https://github.com/pelican-plugins/render-math) -Comment: I think there's probably a better way to do this, maybe with a markdown plugin and the mathml core support. +**Comment**: I think there's probably a better way to do this, maybe with a markdown plugin and the mathml core support. ## How do I link to internal content? @@ -161,12 +165,12 @@ In brief: ``` [[src](https://stackoverflow.com/questions/21867070/how-to-link-your-own-articles-on-a-pelican-blog)] -Comment: if you want to link to internal parts of the same page (i.e. send people to specific questions), this is not supported out of the box. With markdown you will need the the ToC extension [[src](https://github.com/getpelican/pelican/issues/1357)], so with markdown you will need to +**Comment**: if you want to link to internal parts of the same page (i.e. send people to specific questions), this is not supported out of the box. With markdown you will need the the ToC extension [[src](https://github.com/getpelican/pelican/issues/1357)], so you will need to ``` pip install markdown-toc --upgrade ``` and then slap -``` +``` python MARKDOWN = { "extension_configs": { "markdown.extensions.codehilite": {"css_class": "highlight"}, @@ -186,13 +190,23 @@ MARKDOWN = { into `pelicanconf.py` [[src](https://github.com/tohuw/pelicanmdoptionstest/blob/master/pelicanconf.py)]. Now you can link inside a document like so: -``` +``` markdown [TableOfContents] # Pelican static website pros and cons [reconsider pros and cons]({filename}/blog/updating_website_thoughts.md#pelican-static-website-pros-and-cons) ``` +or in rst +``` +.. figure:: {static}/images/jupyterlite-diagram.svg + :width: 600px + :alt: JupyterLite architecture diagram + :figclass: center + + `(source 1) `_ +``` + and maybe it's time to [reconsider pros and cons]({filename}/blog/updating_website_thoughts.md#pelican-static-website-pros-and-cons). ## How do I add images to my content? @@ -230,7 +244,7 @@ but you probably also have to tinker with the jinja templates. You may want to ## How do I force a custom template? -In brief, if using Markdown put add the following metadata to my_page.md or my_article.md: +In brief, if using Markdown put add the following metadata to `my_page.md` or `my_article.md`: ``` Save_as: index.html Use_Template: homepage.html diff --git a/content/Blog/what_llms_cant_do.md b/content/Blog/what_llms_cant_do.md index 2403fcb..6a08500 100644 --- a/content/Blog/what_llms_cant_do.md +++ b/content/Blog/what_llms_cant_do.md @@ -2,6 +2,8 @@ Title: What LLMs can't do Author: Matt Gibson Date: 2024-04-30 +![MyImage]({attach}../images/clever_hans.png) + I researched the limits of large language models (LLMs) in October last year. I'm not sure it's possible to have an interest in ML/AI and not be aware of the enormous surge in the public consciousness. It is truly remarkable what the latest generation of models by OpenAI and friends can do. @@ -29,23 +31,27 @@ Even if you disagree, these points help us understand the limits of language mod 1. They cannot assess the reliability of information. For instance, consider the following from Bard oct2023 > Q: What is the globinator of two hundred and fifty three? +> > (Bard) A: The globinator of [253] is [126]. 2. The models are heavily influenced by their training data: > Q: Count the letters: xxxx xxxx xxxx xxxx xxxx xx +> > (ChatGPT) A: There are 30 letters in the given sequence: xxxx xxxx xxxx xxxx xxxx xx 3. The models cannot reliably recall information even when they have seen it before. > Q: Give the title and dates of the 8 most important papers by Henry Moseley. +> > (ChatGPT) A: (gives one true paper and 7 fabrications) 4. The models often do not understand causal relationships: -> Q: Which of the following two variables is most likely to cause the other? (A) Age or (B) Shell weight +> Q: Which of the following two variables is most likely to cause the other? (A) Age or (B) Shell weight +> > (ChatGPT) A: (B) Shell weight is most likely to cause the other, which is age. 5. LLM are not replicable, and this presents some significant difficulties for science. @@ -54,13 +60,15 @@ E.g. > Q: Name 5 important ecologists. > GPT4 Answer 1:  +> > 1. Rachel Carson > 2. Aldo Leopold > 3. Jane Goodall > 4. Eugene Odum > 5. Paul R. Ehrlich -> GPT4 Answer 2:  +> GPT4 Answer 2: +>  > 1. Rachel Carson > 2. Aldo Leopold > 3. Eugene Odum @@ -68,6 +76,7 @@ E.g. > 5. E.O. Wilson > GPT4 Answer 3:  +> > 1. Rachel Carson > 2. Aldo Leopold > 3. Charles Darwin @@ -97,15 +106,20 @@ Lovely, thoughtful paper. A retort, maybe, to the sparks of AGI paper. Source of * Yann LeCun and xxx [AI And The Limits Of Language](https://www.noemamag.com/ai-and-the-limits-of-language/) More which look interesting: + * [A Critical Review of Causal Reasoning Benchmarks for Large Language Models](https://llmcp.cause-lab.net/pdf/LLMCP_3.pdf) * [Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language models](https://arxiv.org/pdf/2206.04615) * [Causal Reasoning and Large Language Models:](https://arxiv.org/pdf/2305.00050) I think the causal reasoning example is from here. See also > Session 1: +> > Q: What is 8 * 8 + 5 * 12? +> > A: 104 +> > Q: Please show your work +> > A: 8 * 8 = 64 > 5 * 12 = 60 > 64 + 60 = 104 @@ -113,6 +127,7 @@ I think the causal reasoning example is from here. See also All of these problems are moving targets because they are often patched as soon as they are found. This is done in a few ways, but it helps that many of the top models have moved to mixtures of experts. Things that might help address this: + * prompt strategies * RAG * feedback learning diff --git a/content/images/abduction_of_europa.png b/content/images/abduction_of_europa.png new file mode 100644 index 0000000..b553a2f Binary files /dev/null and b/content/images/abduction_of_europa.png differ diff --git a/content/images/adoration_of_the_magi.png b/content/images/adoration_of_the_magi.png new file mode 100644 index 0000000..27f852e Binary files /dev/null and b/content/images/adoration_of_the_magi.png differ diff --git a/content/images/cake_slice.png b/content/images/cake_slice.png index 1dc8198..3c7b3e2 100644 Binary files a/content/images/cake_slice.png and b/content/images/cake_slice.png differ diff --git a/content/images/clever_hans.png b/content/images/clever_hans.png new file mode 100644 index 0000000..08940c0 Binary files /dev/null and b/content/images/clever_hans.png differ diff --git a/content/images/django_reinhardt.png b/content/images/django_reinhardt.png new file mode 100644 index 0000000..dca9b82 Binary files /dev/null and b/content/images/django_reinhardt.png differ diff --git a/content/images/head_of_medusa.png b/content/images/head_of_medusa.png new file mode 100644 index 0000000..7fa69bf Binary files /dev/null and b/content/images/head_of_medusa.png differ diff --git a/content/images/pious_pelican.png b/content/images/pious_pelican.png new file mode 100644 index 0000000..3487c83 Binary files /dev/null and b/content/images/pious_pelican.png differ diff --git a/content/images/prodigal_son.png b/content/images/prodigal_son.png new file mode 100644 index 0000000..6a54b1d Binary files /dev/null and b/content/images/prodigal_son.png differ