Spin (physics) Updated 2025-07-16
Spin is one of the defining properties of elementary particles, i.e. number that describes how an elementary particle behaves, much like electric charge and mass.
The approach shown in this section: Section "Spin comes naturally when adding relativity to quantum mechanics" shows what the spin number actually means in general. As shown there, the spin number it is a direct consequence of having the laws of nature be Lorentz invariant. Different spin numbers are just different ways in which this can be achieved as per different Representation of the Lorentz group.
Video 1. "Quantum Mechanics 9a - Photon Spin and Schrodinger's Cat I by ViaScience (2013)" explains nicely how:
- incorporated into the Dirac equation as a natural consequence of special relativity corrections, but not naturally present in the Schrödinger equation, see also: the Dirac equation predicts spin
- photon spin can be either linear or circular
- the linear one can be made from a superposition of circular ones
- straight antennas produce linearly polarized photos, and Helical antennas circularly polarized ones
- a jump between 2s and 2p in an atom changes angular momentum. Therefore, the photon must carry angular momentum as well as energy.
- cannot be classically explained, because even for a very large estimate of the electron size, its surface would have to spin faster than light to achieve that magnetic momentum with the known electron charge
- as shown at Video "Quantum Mechanics 12b - Dirac Equation II by ViaScience (2015)", observers in different frames of reference see different spin states
Quantum Spin - Visualizing the physics and mathematics by Physics Videos by Eugene Khutoryansky (2016)
Source. Ciro's Edict #4 China front Updated 2025-07-16
At github.com/cirosantilli/china-dictatorship/issues/738 a user made a comment about gang raping my mother (more like country-raping).
As mentioned at github.com/cirosantilli/china-dictatorship/issues/739, ally Martin then reported the issue, and GitHub took down the wumao's account for a while using their undocumented shadowban feature, until the wumao edited the issue.
Based on the discussion with Martin, I then recommended at github.com/cirosantilli/china-dictatorship/blob/41b4741a4e6553f44f5f1ef85cf63c55eb7b8277/CONTRIBUTING.md that we do not report such issues, and that GitHub do not delete such accounts, with rationale explained on the CONTRIBUTING.
Ciro's Edict #4 ourbigbook.com Updated 2025-07-16
I had meant to make an update earlier, but I wanted to try and add some more "visible end-user changes" to OurBigBook.com.
Just noticed BTW that signup on the website is broken. Facepalm. Not that it matters much since it is not very useful in the current state, but still. Going to fix that soon. EDIT: nevermind, it wasn't broken, I just had JavaScript disabled on that website with an extension to test if pages are visible without JavaScript, and yes, they are perfectly visible, you can't tell the difference! But you can't login without JavaScript either!
I still haven't the user visible ones I wanted, but I've hit major milestones, and it feels like time for an update.
I have now finished all the OurBigBook CLI features that I wanted for 1.0, all of which will be automatically reused in ourbigbook.com.
The two big things since last email were the following:
A secondary but also important advance was: further improvements to the website's base technology.
E.g.:
README.cironot-readme.cirothe table of contents for
= My website
== h2
\Include[not-readme]= Not readme
== Not readme h2index.html also contains the headers for not-readme.ciro producing:This feature means that you can split large input files if rendering starts to slow you down, and things will still render exactly the same, with the larger table of contents.
This will be especially important for the website because initially I want users to be able to edit one header at a time, and join all headers with
\Include. But I still want the ToC to show those children.This was a bit hard because it required doing RECURSIVE SQL queries, something I hadn't done before: stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462 + of course the usual refactor a bunch of stuff and fix tests until you go mad.
Ciro's Edict #5 Completely rebrand Cirodown to OurBigBook Updated 2025-07-16
The name cirodown should not appear anywhere now, except with very few exceptions, e.g.:
- github.com/cirosantilli/cirodown to github.com/ourbigbook/ourbigbook
- file extension from
.ciroto.bigb - the Node.js NPM package was renamed from
cirodowntoourbibook. - all in-code instances
I have also squatted
OurBigBook on all major social media handles for near future usage, e.g.: twitter.com/ourbigbook and so on.I was going to do this sooner or later, it was inevitable, but the timing was partly triggered due to noticing that English speakers (and likely many other nationalities) are not able to easily read/hear/pronounce "Ciro".
Ciro's Edict #8 List topics on home page Updated 2025-07-16
The new default homepage for a logged out user how shows a list of the topics with the most articles.
This is a reasonable choice for default homepage, and it immediately exposes users to this central feature of the website: the topic system.
Doing this required in particular calculating the best title for a topic, since it is possible to have different titles with the same ID, the most common way being with capitalization changes, e.g.:would both have topic ID
JavaScript
Javascriptjavascript.The algorithm chosen is to pick the top 10 most upvoted topics, and select the most common title from amongst them. This should make topic title vandalism quite hard. This was made in a single SQL query, and became the most complext SQL query Ciro Santilli has ever written so far: twitter.com/cirosantilli2/status/1549721815832043522
Screenshot showing the list of topics
. The page is: ourbigbook.com for the logged out user, ourbigbook.com/go/topics for the logged in user.Screenshot showing a topic page
. The page is: ourbigbook.com/go/topic/vector-space. Before this sprint, we didn't have the "Vector Space" at the top, as it wasn't necessarily trivial to determine what the preferred title would be. Ciro's Edict #8 Next steps Updated 2025-07-16
I guess ended up doing all the "how things should look like" features because they clarify what the website is supposed to do, and I already have my own content to bring it alive via
ourbigbook --web upload.But now I honestly feel that all the major elements of "how things should look like" have fallen into place.
I was really impressed by Trillium Notes. I should have checked it long ago. The UI is amazing, and being all Js-based, could potentially be reused for our purposes. The project itself is a single-person/full trust notetaking only for now however, so not a direct replacement to OurBigBook.
Spontaneous parametric down-conversion Updated 2025-07-16
You can then detect one of the photons, and when you do you know that the other one is there as well and ready to be used. two photon interference experiment comes to mind, which is the basis of photonic quantum computer, where you need two photons to be produced at the exact same time to produce quantum entanglement.
Features Alan Migdall of the National Institute of Standards and Technology. Produced by the Joint Quantum Institute (JQI).
Mentions that this phenomena is useful to determine the efficiency of a single photon detector, as you have the second photon of the pair as a control.
Also briefly describes how the input energy and momentum must balance out the output energy and momentum of the two photons coming out (determined by the output frequency and angle).
Shows the crystal close up of the crystal branded "Cleveland Crystals Inc.". Mentions that only one in a billion photon gets scattered.
Also shows a photomultiplier tube.
Then shows their actual optical table setup, with two tunnels of adjustable angle to get photons with different properties.
Very short whiteboard video by Peter Mosley from the University of Bath, but it's worth it for newbs. Basically describes spontaneous parametric down-conversion.
One interesting thing he mentions is that you could get single photons by making your sunglasses thicker and thicker to reduce how many photons pass, but one big downside problem is that then you don't know when the photon is going to come through, that becomes essentially random, and then you can't use this technique if you need two photons at the same time, which is often the case, see also: two photon interference experiment.
SQL contiguous ranges Updated 2025-07-16
stackoverflow.com/questions/17046204/how-to-find-the-boundaries-of-groups-of-contiguous-sequential-numbers/17046749#17046749 just works, even in SQLite which supports all quoting types known to man including
[] for compatibility with insane RDBMSs!Here's a slightly saner version:
rm -f tmp.sqlite
sqlite3 tmp.sqlite "create table mytable (id integer primary key autoincrement, number integer, status integer)"
sqlite3 tmp.sqlite <<EOF
insert into mytable(number, status) values
(100,0),
(101,0),
(102,0),
(103,0),
(104,1),
(105,1),
(106,0),
(107,0),
(1014,0),
(1015,0),
(1016,1),
(1017,0)
EOF
sqlite3 tmp.sqlite <<EOF
SELECT
MIN(id) AS "id",
MIN(number) AS "from",
MAX(number) AS "to"
FROM (
SELECT ROW_NUMBER() OVER (ORDER BY number) - number AS grp, id, number
FROM mytable
WHERE status = 0
)
GROUP BY grp
ORDER BY MIN(number)
EOFoutput:
1|100|103
7|106|107
9|1014|1015
12|1017|1017To get only groups of length greater than 1:
sqlite3 tmp.sqlite <<EOF
SELECT "id", "from", "to", "to" - "from" + 1 as "len" FROM (
SELECT
MIN("id") AS "id",
MIN(number) AS "from",
MAX(number) AS "to"
FROM (
SELECT ROW_NUMBER() OVER (ORDER BY "number") - "number" AS "grp", "id", "number"
FROM "mytable"
WHERE "status" = 0
)
GROUP BY "grp"
ORDER BY MIN("number")
) WHERE "len" > 1
EOFOutput:
1|100|103|4
7|106|107|2
9|1014|1015|2 SQL histogram Updated 2025-07-16
OK, there's a billion questions:
- SQL Server
- stackoverflow.com/questions/485409/generating-a-histogram-from-column-values-in-a-database OP did not know the difference between count and histogram :-) But it's the number one Google result.
- stackoverflow.com/questions/19103991/create-range-bins-from-sql-server-table-for-histograms has a minor extra group by twist, but otherwise fine
- stackoverflow.com/questions/16268441/generate-histogram-in-sql-server
- SQLite
- stackoverflow.com/questions/67514208/how-to-optimise-creating-histogram-bins-in-sqlite perf only, benchmarking would be needed. SQLite.
- stackoverflow.com/questions/32155449/create-a-histogram-with-a-dynamic-number-of-partitions-in-sqlite variable bin size, same number of entries per bin
- stackoverflow.com/questions/60348109/histogram-for-time-periods-using-sqlite-regular-buckets-1h-wide time
- MySQL: stackoverflow.com/questions/1764881/getting-data-for-histogram-plot MySQL appears to extend
ROUNDto also round by integers:ROUND(numeric_value, -2), but this is not widely portable which is a shame - stackoverflow.com/questions/72367652/populating-empty-bins-in-a-histogram-generated-using-sql specifically asks about empty bins, which is amazing. Amazon Redshift dialect unfortunately, but answer provided works widely, and Redshift was forked from PostgreSQL, so there's hope. Those newb open source server focused projects that don't use AGPL!
Let's try it on SQLite 3.40.1, Ubuntu 23.04. Data setup:
sqlite3 tmp.sqlite 'create table t(x integer)'
sqlite3 tmp.sqlite <<EOF
insert into t values (
0,
2,
2,
3,
5,
6,
6,
8,
9,
17,
)
EOF
sqlite3 tmp.sqlite 'create index tx on t(x)'For a bin size of 5 ignoring empty ranges we can:which produces the desired:
sqlite3 tmp.sqlite <<EOF
select floor(x/5)*5 as x,
count(*) as cnt
from t
group by 1
order by 1
EOF0|4
5|5
15|1And to consider empty ranges we can use SQL which outputs the desired:
genenerate_series + as per stackoverflow.com/questions/72367652/populating-empty-bins-in-a-histogram-generated-using-sql:sqlite3 tmp.sqlite <<EOF
select x, sum(cnt) from (
select floor(x/5)*5 as x,
count(*) as cnt
from t
group by 1
union
select *, 0 as cnt from generate_series(0, 15, 5)
)
group by x
EOF0|4
5|5
10|0
15|1sqlite3 Node.js package Updated 2025-07-16Includes its own copy of sqlite3, you don't use the system one, which is good to ensure compatibility. The version is shown at: github.com/mapbox/node-sqlite3/blob/918052b538b0effe6c4a44c74a16b2749c08a0d2/deps/common-sqlite.gypi#L3 SQLite source is tracked compressed in-tree: github.com/mapbox/node-sqlite3/blob/918052b538b0effe6c4a44c74a16b2749c08a0d2/deps/sqlite-autoconf-3360000.tar.gz horrendous. This explains why it takes forever to clone that repository. People who don't believe in git submodules, there's even an official Git mirror at: github.com/sqlite/sqlite
It appears to spawn its own threads via its C extension (since JavaScript is single threaded and and SQLite is not server-based), which allows for parallel queries using multiple threads: github.com/mapbox/node-sqlite3/blob/v5.0.2/src/threading.h
Hello world example: nodejs/node-sqlite3/index.js.
As of 2021, this had slumped back a bit, as maintainers got tired. Unmerged pull requests started piling more, and
better-sqlite3 Node.js package started pulling ahead a little.- github.com/mapbox/node-sqlite3/issues/1381
FATAL ERROR: Error::ThrowAsJavaScriptException napi_throwwith Node.jsworker_threadsvsbetter-sqlite3Node.js package github.com/JoshuaWise/better-sqlite3/issues/237
SQL RECURSIVE prevent infinite recursion Updated 2025-07-16
Example under: nodejs/sequelize/raw/tree.js
SQL tree traversal Updated 2025-07-16
Example: nodejs/sequelize/raw/tree.js
- Implementation agnostic
- Postgres
- stackoverflow.com/questions/67848017/simple-recursive-sql-query
- stackoverflow.com/questions/28688264/how-to-traverse-a-hierarchical-tree-structure-structure-backwards-using-recursiv
- stackoverflow.com/questions/51822070/how-can-postgres-represent-a-tree-of-row-ids
- depth first
- uspecified depth first variant
- preorder DFS
- breadth-first stackoverflow.com/questions/3709292/select-rows-from-table-using-tree-order
- MySQL
- Microsoft SQL Server
SQL TRIGGER Updated 2025-07-16
In particular, everything that happens in a trigger happens as if it were in a transaction. This way, you can do less explicit transactions when you use triggers. It is a bit like the advantages of SQL CASCADE.
DBMS:
SQL window
RANGE Updated 2025-07-16rm -f tmp.sqlite
sqlite3 tmp.sqlite "create table t (id integer, val integer)"
sqlite3 tmp.sqlite <<EOF
insert into t values
(0, 0),
(1, 5),
(2, 10),
(3, 14),
(4, 15),
(5, 16),
(6, 20),
(7, 25),
(8, 29),
(9, 30),
(10, 30),
(11, 31),
(12, 35),
(13, 40)
EOFShow how many neighbours each column has with Output:
val between val - 2 and val + 2 inclusive:sqlite3 tmp.sqlite <<EOF
SELECT id, val, COUNT(*) OVER (
ORDER BY val RANGE BETWEEN 2 PRECEDING AND 2 FOLLOWING
) FROM t;
EOF0|0|1
1|5|1
2|10|1
3|14|3
4|15|3
5|16|3
6|20|1
7|25|1
8|29|4
9|30|4
10|30|4
11|31|4
12|35|1
13|40|1val - 1 and val + 1 inclusive instead:sqlite3 tmp.sqlite <<EOF
SELECT id, val, COUNT(*) OVER (
ORDER BY val RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING
) FROM t;
EOF0|0|1
1|5|1
2|10|1
3|14|2
4|15|3
5|16|2
6|20|1
7|25|1
8|29|3
9|30|4
10|30|4
11|31|3
12|35|1
13|40|1There seems to be no analogue to HAVING for window functions, so we can just settle for a subquery for once, e.g.:which outputs:
sqlite3 tmp.sqlite <<EOF
SELECT * FROM (
SELECT id, val, COUNT(*) OVER (
ORDER BY val RANGE BETWEEN 1 PRECEDING AND 1 FOLLOWING
) as c FROM t
) WHERE c > 2
EOF4|15|3
8|29|3
9|30|4
10|30|4
11|31|3 SQUID device Updated 2025-07-16
Superconducting Quantum Interference Device by Felipe Contipelli (2019)
Source. Good intuiotionistic video. Some points deserved a bit more detail.Mishmash of SQUID interviews and talks by Bartek Glowaki
. Source. The videos come from: www.ascg.msm.cam.ac.uk/lectures/. Vintage.
One of the segments is by John Clarke.
An experimental lab video for COVID-19 lockdown. Thanks, COVID-19. Presented by a cute and awkward Adam Stewart.
Uses a SQUID device and control system made by STAR Cryoelectronics. We can see Mr. SQUID EB-03 written on the probe and control box, that is their educational product.
As mentioned on the Mr. SQUID specs, it is a high-temperature superconductor, so liquid nitrogen is used.
He then measures the I-V curve on an Agilent Technologies oscilloscope.
Unfortunately, the video doesn't explain very well what is happening behind the scenes, e.g. with a circuit diagram. That is the curse of university laboratory videos: some of them assume that students will have material from other internal sources.
- youtu.be/ql2Yo5LgU8M?t=211 shows the classic voltage oscillations, presumably on a magnetic field sweep, and then he puts a magnet next to the device from outside the Dewar
- youtu.be/ql2Yo5LgU8M?t=253 demonstrates the formation of Shapiro steps. Inserts a Rohde & Schwarz signal generator into the Dewar to vary the flux. The result is not amazing, but they are visible somewhat.
Stabilizer (group) Updated 2025-07-16
If we pick k elements of the set, the stabilizer subgroup of those k elements is a subgroup of the given permutation group that keeps those elements unchanged.
Note that an analogous definition can be given for non-finite groups. Also note that the case for all finite groups is covered by the permutation definition since all groups are isomorphic to a subgroup of the symmetric group
TODO existence and uniqueness. Existence is obvious for the identity permutation, but proper subgroup likely does not exist in general.
Standard cell library Updated 2025-07-16
Basically what register transfer level compiles to in order to achieve a real chip implementation.
After this is done, the final step is place and route.
They can be designed by third parties besides the semiconductor fabrication plants. E.g. Arm Ltd. markets its Artisan Standard Cell Libraries as mentioned e.g. at: web.archive.org/web/20211007050341/https://developer.arm.com/ip-products/physical-ip/logic This came from a 2004 acquisition: www.eetimes.com/arm-to-acquire-artisan-components-for-913-million/, obviously.
The standard cell library is typically composed of a bunch of versions of somewhat simple gates, e.g.:and so on.
Each of those gates has to be designed by hand as a 3D structure that can be produced in a given fab.
Simulations are then carried out, and the electric properties of those structures are characterized in a standard way as a bunch of tables of numbers that specify things like:Those are then used in power, performance and area estimates.
Stars nearest to the Sun Updated 2025-07-16
Some notable ones:
Star Trek: The Next Generation Updated 2025-07-16
Ciro Santilli likes this.
He doesn't have the patience to actually watch full episodes with rare exceptions, rather just watching selected scenes from: www.youtube.com/channel/UCdeIGY2DIjpGf0A2m9GSE3g, but still, it is interesting.
What appeals to Ciro in this series is how almost nothing is solved by violence, almost everything is decided in the bridge, at the "cerebral" level of the command structure. This reminds Ciro of a courtroom of law sometimes.
Maybe there's also a bit of 90's nostalgia involved too though, as this is something that would show on some random cable channels a bored young Ciro would have browsed during weekends, never really watching full episodes.
One crime of many episodes is being completely based on some stupid new scientific concept, which any character to back it up.
Another thing that hurt is that due to their obsession with the senior members of the crew, sometimes those senior members are sent in ridiculously risky operations, which is very unrealistic.
Episodes that Ciro watched fully and didn't regret:
- s02e09 Measure of a man en.wikipedia.org/wiki/The_Measure_of_a_Man_(Star_Trek:_The_Next_Generation) see also physics and the illusion of life
- s04e14 Clues en.wikipedia.org/wiki/Clues_(Star_Trek:_The_Next_Generation)
- s04e15 First contact en.wikipedia.org/wiki/First_Contact_(Star_Trek:_The_Next_Generation). Although the premise that the aliens look so much like humans, and worse, that Decker could speak their language to the point of passing as one of their race is preposterous, the idea of inversion of first contact is just too cute.
- s07e15 The Lower Decks en.wikipedia.org/wiki/Lower_Decks_(Star_Trek:_The_Next_Generation), sliding scale of idealism vs. cynicism near cynincism, yes please
Semi worth it:
- s03e11 The Hunted memory-alpha.fandom.com/wiki/The_Hunted_(episode) if it weren't for the ending, maybe this would have been decent
Not worth it:
- Cause and effect
TODO
- s06e11 Chain of command
There are unlisted articles, also show them or only show them.


