Keep dipping my toes in Common Lisp. Have written a tiny script. There are my little insides:
- Parentheses annoy no more than ; in C/C++ or indentation in Python
- The way of declaring local variables is awesome. Their scope is clear. No chance for failure.
Virtual transactions combined with auto posting in #hledger are very usefull for analytics. For my investments I have 15-20 transaction per year, about 10 commodities, and a bunch of accounts for analytics.
Call hledger to get the portfolio structure. It is quite aggressive...
There are many strange things in #CommonLisp for beginner. In my very first attempt I spent at least two hours with dotted pairs and quotation. Why on Earth they work this way?
2
I’ve deleted analytics, comments and share buttons from all my websites. Here is why. buff.ly/3LGOmFb
Simple programming rule: if anyone gets stuck on something for more than 30 minutes, they should ask for help. Usually, I find myself in big trouble if I don't follow it. buff.ly/3K9FyHu
Alexander Korablev retweeted
#Python technique tip:
def next_power_of_two(n: int) -> int:
' Return 2ⁱ such than 2ⁱ⁻¹ ≤ n < 2ⁱ. '
return 1 << n.bit_length()
4 ⟶ 8
5 ⟶ 8
6 ⟶ 8
7 ⟶ 8
8 ⟶ 16
9 ⟶ 16
10 ⟶ 16
11 ⟶ 16
12 ⟶ 16
13 ⟶ 16
14 ⟶ 16
15 ⟶ 16
16 ⟶ 32
Recommend to read this article about a specific aspect of #typehints in #Python if you struggle typing context managers buff.ly/3eiembu
1
Discovering how CPython works is always fascinating.
Constant Folding in Python | Arpit Bhayani buff.ly/3ikTH7Y
How to troubleshoot memory problems in Python buff.ly/3vDBdog
“A bird's view look to the Typing features in Python 3.x” buff.ly/3xCJdaA
Alexander Korablev retweeted
The #Python super-considered-super video now has over 100,000 unique views. The associated blog post is over a half million.
This seems to be an area of great interest.
This Post is from an account that no longer exists. Learn more
Alexander Korablev retweeted
1/ #Python tip: The functools.cache() decorator is astonishingly fast.
Even an empty function that returns None can be sped-up by caching it. 🤨
docs.python.org/3/library/fu…
Comprehending Class-Based Views in Django - The View Base Class buff.ly/33tai3C







