trying to fix

This commit is contained in:
Chris Cochrun 2022-01-03 12:41:35 -06:00
parent fa407dfeb6
commit e013d7569e
22945 changed files with 447936 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<p>John Kitchin has another video up on his <a href="https://www.youtube.com/playlist?list=PL0sMmOaE_gs3E0OjExoI7vlCAVygj6S4I">Scimax Channel</a>. This time, its about <a href="https://www.youtube.com/watch?v=HyFbIWvmV0A">elementary Elisp data structures</a> and their manipulation. He considers</p>
<ul class="org-ul">
<li>Strings</li>
<li>Lists</li>
<li>Vectors</li>
<li>Alists</li>
<li>Plists</li>
<li>Hash tables</li>
</ul>
<p>Strings arent really a data structure in the sense of the others but they are, in effect, character arrays and its possible to extract or insert data into a string.</p>
<p>The premier Lisp data structure is, of course, the list. After all, its name appears on the marquee. Kitchin describes the need and use of quoting and quasiquoting and various ways of accessing list elements. Im not really a Lisp old-timer but Ive been at it long enough that I still prefer the <code>car</code> and <code>cdr</code> primitives to the newfangled inventions such as <code>first</code>, <code>tail</code>, <code>cl-first</code>, and all the rest. If I need an element after the third or fourth, Ill use <code>nth</code> or <code>elt</code>. Kitchin likes the <code>cl-*</code> constructs and as usual Emacs lets you have it your way.</p>
<p>Like me, Kitchin doesnt use vectors very often and doesnt have much to say about them but they are simple and easy to use.</p>
<p>Alists and plists are two variations on the same theme. Theyre both lists of key/value pairs differing in their representation and access means. A good argument can be made that we dont need both but they exist for <a href="http://www.catb.org/jargon/html/H/hysterical-reasons.html">hysterical raisons</a> and Lispers tend to use them both.</p>
<p>Finally, there are hash tables. The idea is pretty well known by now although they are commonly called dictionaries in other languages. They are, again, key/value pairs but have a generally \(O(1)\) lookup time while alists and plists are \(O(n)\). That doesnt matter for small lists but with hundreds or thousands of items the \(O(n)\) can add up so hash tables make sense for that case.</p>
<p>Even if youre familiar with using hash tables in Elisp, you may not be familiar with using “reader notation” for initializing a hash table. It really makes sense only for small hash tables—or for writing out and then later reading in a hash table.</p>
<p>The video is just short of 26 minutes so plan accordingly. As usual with Kitchins videos, its well worth the time to watch it even if youre an experienced Elisper.</p>