
Even if the Bee could explain to the fly why pollen is better than shit, the fly would not understand.
.
.
2022.07.29 Friday ACHK

Even if the Bee could explain to the fly why pollen is better than shit, the fly would not understand.
.
.
2022.07.29 Friday ACHK
這段改編自 2021 年 12 月 15 日的對話。
.
男女友人,如果長期(一年)時常(每週)見面的話,不會是純友誼。
在這個上文下理中,男女之間不會有「純友誼」,除非外貌驚奇。
.
不會有「純友誼」,但可不可以有「純仇恨」?
— Me@2022-07-29 02:37:02 PM
.
.
2022.07.29 Friday (c) All rights reserved by ACHK
SICMUtils, 2
.
The goal of this post to setup the Emacs editor for Clojure programming.
.
1. Read and follow the exact steps of the last post.
.
2. Open the .emacs file. Go to the end of the file. Add the following code:
(require 'org) (require 'ob-clojure) (setq org-babel-clojure-backend 'cider) (require 'cider) (set-register ?c '(file . "~/my-stuff/my-stuff.org")) (setq org-confirm-babel-evaluate nil) (setq org-src-tab-acts-natively t)
3. Close Emacs.
.
4. Go to the directory “~/my-stuff/” and then create a file named “my-stuff.org“.
5. Use Emacs to open the file.
6. Within the file, add the following code:
#+BEGIN_SRC emacs-lisp (+ 1 1) #+END_SRC
7. Place the text cursor in the code block (between the line #+BEGIN_SRC and the line #+END_SRC).
8. Hit the Emacs command
C-c C-c
9. You will get the evaluation result:
#+RESULTS: : 2
.
10. Hit the Emacs command:
M-x cider-jack-in
11. Within the file “my-stuff.org“, add the code:
#+BEGIN_SRC clojure :results value (require '[sicmutils.env :as env]) #+END_SRC
12. Place the text cursor in the code block.
13. Hit the Emacs command
C-c C-c
.
14. Add the code:
#+BEGIN_SRC clojure :results value (env/bootstrap-repl!) #+END_SRC
15. Place the text cursor in the code block and then hit the Emacs command
C-c C-c
.
16. Add the code:
#+BEGIN_SRC clojure :results replace drawer (->TeX (simplify ((D cube) 'x))) #+END_SRC
17. Place the text cursor and then hit
C-c C-c
It will give you the code
#+RESULTS:
:RESULTS:
"3\\,{x}^{2}"
:END:
— Me@2022-07-27 11:34:28 PM
.
.
2022.07.28 Thursday (c) All rights reserved by ACHK
A Clojure(script) implementation of the
scmutilssystem for math and physics investigations in the Clojure and Clojurescript languages.
.
1. To install Clojure in Ubuntu, just this command is enough:
sudo apt-get install elpa-cider
Although the Clojure version you get is probably not the most updated one, that is not important, because you can specify which version you want in the config file of each project.
.
2. Then use this command to generate a new project named my-stuff:
lein new app my-stuff
.
3. Use Emacs to open the file:
~/my-stuff/project.clj
.
4. Replace the existing :dependencies line with this one
:dependencies [[org.clojure/clojure "1.11.1"]
[sicmutils "0.22.0"]]
And make sure that both clojure and sicmutils have the most updated version numbers.
.
5. In Emacs, type the command
M-x cider-jack-in
.
6. In the clojure window (cider-repl), type
(clojure-version)
with enter at the end.
.
7. Type
(require '[sicmutils.env :as env])
.
8. Type
(env/bootstrap-repl!)
.
9. Code
((D cube) 'x)
will result
(+ (* x x) (* x (+ x x)))
.
10. Type the Emacs command
M-p
to access the last input. Then modify it into
(simplify ((D cube) 'x))
.
It will result
(* 3 (expt x 2))
.
11. Code
(->TeX (simplify ((D cube) 'x)))
will give the code
3\\,{x}^{2}
.
12. You can exit by the Emacs command
<C-c C-q>
.
For the time being, SICMUtils is not suitable for the book SICM (Structure and Interpretation of Classical Mechanics). In other words, SICMUtils cannot replace the scmutils library yet, because:
a. You would have to do the translation manually, from the scmutils code in the book to SICMUtils.
b. Although it can generate source code, it does NOT do the
rendering.
c. It cannot plot graphs.
However, SICMUtils has one advantage over scmutils. It can generate source of an expression, but
scmutils cannot. So I am planning to use both scmutils and SICMUtils.
Also, I will learn how to use SICMUtils with other Clojure libraries and the Jupyter Notebook. That would get rendering and graph plotting running.
— Me@2022-07-26 11:03:51 AM
.
.
2022.07.26 Tuesday (c) All rights reserved by ACHK
Realist view is wrong.
Before measurement, there are quantum potentials only.
quantum ~ potential
Note that it is NOT the “quantum potential” in the Bohm interpretation.
— Me@2016-08-21 06:13:49 PM
.
A wave function encodes the probabilities of different potential measurement results of a physical experiment. It is not a physical wave.
Quantum superposition is NOT a superposition of realities.
Physics should consider only measurement results and their probabilities. Only measurement results are realities.
No measurement result, aka physical phenomenon, is in a superposition.
For example, in the double-slit experiment, the measurement results are (the locations of) the dots on the final screen. Every dot location is not in a superposition.
— Me@2022-07-25 06:43:05 PM
.
.
2022.07.25 Monday (c) All rights reserved by ACHK
潛行凶間
~ 潛移默化
— Me@2016-04-02 08:40:30 PM
.
.
2022.07.25 Monday (c) All rights reserved by ACHK
反不相關推薦 3
這段改編自 2010 年 4 月 24 日的對話。
.
(安:雖然我不是從事教學工作,但是,在公司解釋東西給上司時,其實很多時也需要使用到,所謂的「教學技巧」。
你有沒有一些推介呢?)
.
我在初入行時,教學頗為混亂。我以為在每一課中,教得越多東西越好。
在教了約兩年後,大約 2006/7 年,閱到數學家 John Baez 的幾點教學建議。對我最重要的一點是:
Keep the Sheep Moving in the Same Direction – a lecture should have a clear and simple plot. Avoid anything that distracts from this. Don’t make too many points. Don’t be afraid to repeat yourself.
— How to Teach Stuff
不是講得越多越好,而是相反——講得越少越好。
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
— Antoine de Saint-Exupéry
.
(假設每一節課,都是一小時以內。)
每一節課應該,只有一個重點。在該課中,你要用不同的句子、字眼、例子,來重複釐清和闡述,那個重點。講課時,一切的細節,都要圍繞著,那個重點來運行。
Every lecture should make only one main point.
The German philosopher G. W. F. Hegel wrote that any philosopher who uses the word “and” too often cannot be a good philosopher. I think he was right, at least insofar as lecturing goes. Every lecture should state one main point and repeat it over and over, like a theme with variations.
— Advice for the Young Scientist
— John Baez
.
又例如,見工面試時,你重點必須是,
1. 你將如何為公司賺錢?
2. 為何要選你,而不是其他應徵者?
你的一切才能,都要圍繞著,這個重點來介紹。換而言之,千萬要記住,要的是「賺錢介紹」,不是「自我介紹」。沒有人想理會,你的「自我」。
.
(安:那是兩個重點,而不是一個。)
.
可合體為:
在「為本公司賺錢」這方面,你如何優勝過,其他應徵者?
— Me@2022-07-24 04:41:17 PM
.
.
2022.07.25 Monday (c) All rights reserved by ACHK
; sudo apt-get install sbcl ; sudo apt-get install slime ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq inferior-lisp-program "sbcl") (defun load-slime-with-correct-buffer-position () (save-excursion (slime)) (delete-other-windows) ) (defun prelude-start-slime () (unless (slime-connected-p) (load-slime-with-correct-buffer-position))) (add-hook 'slime-mode-hook 'prelude-start-slime) (set-register ?f '(file . "/path_to/lisp_file.lisp"))
— Me@2022-07-23 05:20:32 PM
.
.
2022.07.23 Saturday (c) All rights reserved by ACHK
A generalized coordinate component that does not appear explicitly in the Lagrangian is called a cyclic coordinate. The generalized momentum component conjugate to any cyclic coordinate is a constant of the motion.
— 1.8 Conserved Quantities
— Structure and Interpretation of Classical Mechanics
.
This is a special case of Noether’s theorem. Such coordinates are called “cyclic” or “ignorable”.
— Wikipedia on Lagrangian mechanics
.
If only the cyclic coordinate varies with time (if it doesn’t,
is superfluous), the Lagrangian, or the essential physical situation, doesn’t vary. Hence the initial value of
doesn’t determine the path, which is only possible if the path is closed.
— edited Jul 28, 2014 at 15:55
— ACuriousMind
— answered Jul 28, 2014 at 15:50
— Pieter Kockx
— Why are they called “cyclic” coordinates?
— Physics Stack Exchange
.
.
2022.07.22 Friday ACHK
Feynman’s philosophy of learning and discovery comes through strongly in these lectures. He constantly points out the benefits of play around with concepts and working out solutions to problems on your own before looking at the back for the answers. As Feynman says in the lectures: “If you keep proving stuff that others have done, getting confidence, increasing the complexities of your solutions — for fun of it — then one day you’ll turn around and discovered that nobody actually did that one! And that’s the way, to become a computer scientist.” Imagine that you are explaining your ideas to your former smart but ignorant, self, at the beginning of your studies!
— Feynman[ Lectures on ]Computation
— 30[.]06[.]2003
.
.
2022.07.21 Thursday ACHK
~~~
ENGG 2011 - Advanced Engineering Maths - Assignment 1
~~~
C++: function(...)
Many argument[s]
~~~
C++: mid-term test (31/10/2011)
~~~
.
.
2022.07.21 Thursday (c) All rights reserved by ACHK
本來沒有「社會」,有的是「個人」。要「社會」供養你,其實就是要,「其他人」供養你。
「自力更生」的好處是,你的才能會越來越強。「他力更生」的壞處是,不一定有;即使有,你的財能會遇弱越弱。
「求之於己」的好處是,自己會越來越強,自己成自己的主人。「依賴他人」的壞處是,他人會越來越強,自己成了他人的奴隸。
.
免費的東西是最昂貴,因為,它把代價隱藏了,對你溫水煮蛙。
.
已有財富有盡,創造財富無窮。賺錢,就是接收,來自未來的金錢。
過去有限,未來無限。
— Me@2022-07-14 03:27:39 PM
.
.
2022.07.19 Tuesday (c) All rights reserved by ACHK

.
.
2022.07.18 Monday ACHK
A First Course in String Theory
.
Since has the same unit in all dimensions,
.
Eq. (3.104):
.
.
— Me@2022-07-17 04:23:42 PM
.
.
2022.07.17 Sunday (c) All rights reserved by ACHK
mjburgess 11 days ago | next [–]
These definitions don’t really give you the idea, rather often just code examples..
“The ideas”, in my view:
| Monoid | = | units that can be joined together |
| Functor | = | context for running a single-input function |
| Applicative | = | context for multi-input functions |
| Monad | = | context for sequence-dependent operations |
| Lifting | = | converting from one context to another |
| Sum type | = | something is either A or B or C… |
| Product type | = | a record |
| = | something is both A and B and C | |
| Partial application | = | defaulting an argument to a function |
| Currying | = | passing some arguments later |
| = | rephrasing a function to return a functions of n-1 arguments when given 1, st. the final function will compute the desired result | |
| EDIT: Context | = | compiler information that changes how the program will be interpreted (, executed, compiled,…) |
| Eg., context | = | run in the future, run across a list, redirect the i/o, … |
— Functional programming jargon in plain English
— Hacker News
.
Currying and partial function application are often conflated. One of the significant differences between the two is that a call to a partially applied function returns the result right away, not another function down the currying chain; this distinction can be illustrated clearly for functions whose arity is greater than two.
.
Partial application can be seen as evaluating a curried function at a fixed point, e.g. given and
then
or simply
where curries
‘s first parameter.
— Wikipedia on Currying
.
.
2022.07.16 Saturday ACHK
[約會]是一件輕鬆愉快的事情,不是什麼山盟海誓的嚴肅使命。所以,兄弟們一定要注意,在追女生的時候,[要]給到女生輕鬆愉快的體驗;不要有太多的包袱,和太多的要求,出來約會。
我們要做的第一目標,就是開心和輕鬆;讓女生覺得,跟你在一起是,自由自在的,沒有壓力就足夠了。比如說,你們可以玩,你喜歡的遊戲,吃你們喜歡的美食,去體驗約會的美好。
有的兄弟上來逮著女生,就衝著一生一世去聊天,反而會把女生嚇跑。
— 楚兒戀愛說
.
浪漫化,是對你妻子(或未來妻子),才應該做的。
切勿浪漫化,在那之前的階段。
— Me@2022-06-27 01:31:05 AM
.
.
2022.07.16 Saturday (c) All rights reserved by ACHK
以右攻左, 2
這段改編自 2021 年 12 月 14 日的對話。
.
美國民主黨時常強調,要分享財富。但是,他們從來沒有強調,財富從何而來。財富不會從天而降。無論是什麼機構,財富都是要由個人,創造出來的。
我就未曾聽過,美國民主黨的議員,鼓勵窮人創造財富。那些議員的正職,理應制定法律,協助個人自力更生,自我創造,自力更新,由窮人進化成富人。起點可以是提供補助,但那只可以是短期措施。長遠要提供的是「機會」——公平競爭的機會。
可惜,議員往往為了選票,鼓勵窮人要長期補助,升格為「永久窮人」。
既然不肯鼓勵創造財富,美國民主黨就只有鼓吹,將富人的錢,轉移至窮人。但是,那些議員,自己往往也是富人,卻不會以身作則。他們不會,分享自己的財富。他們只會,分享其他富人的財富。簡言之,他們只會「慷他人之慨」,卻不會「慷自己之概」。
作為民選議員,理應負責解決問題。但他們通常也只會,叫其他人去做事。
.
我讀書時期,有次我班有幾位同學,更新了壁報板的設計。班主任談及該作品時,有些同學立刻評論,那設計有哪些地方不好,應該怎樣做才對;不斷問:「點解唔咁樣做?」
意思是「為何不這樣做?為何不那樣做?」等等。
.
班主任立刻責備道:「下次就應該找,問這些無禮問題的人,來負責壁報板的設計製作。」
有些人總會,對真正做事的人指指點點,而自己卻對該事,亳無建樹。
總會有些人,講就天下無敵,做就無心無力。
— Me@2022-07-14 03:27:39 PM
.
.
2022.07.15 Friday (c) All rights reserved by ACHK

— Me@2022-07-13 11:52:51 PM
.
.
2022.07.13 Wednesday (c) All rights reserved by ACHK
1.7 Evolution of Dynamical State, 2.3
Structure and Interpretation of Classical Mechanics
.
.
where
is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.
~~~
[guess]
.
.
.
.
[guess]
— Me@2022-07-09 09:09:28 PM
.
.
2022.07.13 Wednesday (c) All rights reserved by ACHK
flavio81 11 months ago [-]
The author, a famous and well-liked lisper, is not considering portability features. CL is an ANSI standard and code often runs with no changes in many distinct CL implementations/compilers/interpreters.
Also, related to that point: There are many different CL implementations out there that satisfy different use cases, like for example JVM deployment (ABCL), embedded systems (ECL), speed(SBCL), fast compile times (Clozure), pro-level support (LispWorks, ACL), etc. So the same code has a huge amount of options for deployment. It really makes Common Lisp be “write once, run anywhere”.
Then speed is also never mentioned. Lisp can be seriously fast; under SBCL it is generally 0.3x to 1x C speed; LispWorks might be faster, and there’s a PDF out there called “How to make Lisp go faster than C”, so that should give an idea of Lisp speed potential.
CL wasn’t created by philosophing about what a programming language should be for many years; CL was basically created by merging Lisps that were already proven in the industry (Maclisp, Zetalisp, etc), already proven to be good for AI, heavy computation, symbolic computation, launching rockets, writing full operating systems, etc.
CL is a “you want it, you got it” programming language. You want to circumvent the garbage collector? Need to use GOTOs for a particular function? Want to produce better assembly out? Need side effects? Multiple inheritance? Want to write an OS? CL will deliver the goods.
In short, I would guess that from a computer scientist or reseacher point of view, Racket is certainly more attactive, but for the engineer or start-up owner that wants to have killer production systems done in short time, or to create really complex, innovative systems that can be deployed to the real world, Common Lisp ought to be the weapon of choice!
— Why I haven’t jumped ship from Common Lisp to Racket just yet
— Hacker News
.
.
2022.07.13 Wednesday ACHK
You must be logged in to post a comment.