Sunday, July 14, 2024
PCIe 6.2 terms
Saturday, August 6, 2022
SpaceStation14 Development with MacOS on MacBook M1
Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs: var paths = sResourceManager.ContentFindFiles(prototypePath)
Content.IntegrationTests/Tests/GameObjects/Components/EntityPrototypeComponentsTest.cs: var file = sResourceManager.ContentFileRead(path);
Saturday, August 28, 2021
Updated "Why I believe" for Computer82 Happiness Group
Originally written Feb 2008
Why I Believe
It seems that my life has been a turbulent journey,
full of inner struggles.
I was born in 1967 -- the year Mao's Culture Revolution began. A few days after
my birth, the warring Red Guard factions forced Mother to flee the hospital
with me in her bosom.
Culture Revolution came hard on my parents, for the simple reason that my
grandparents were political prisoners affiliated with KMT. My parents were
treated harshly by the local Red Guards. I still recall that, as soon as I
began to perceive emotions, I sensed a constant, hovering, thickening layer of
stressful, inferior and hopeless feelings projected from my father to me. I was
a survivor at 5 or 6, so before long I learnt to take refuge in books and
fantasies, my favorite been Andersson Fairy Tales and Asimov Science fictions,
not to mention poetry by 泰戈尔(Rabindranath
Tagore). Looking back, it was mom's love and strength, plus the relief from
books and fantasies that my own budding inner world could develop before the
harsh environment suffocated it. At that point, I sworn to myself to grow up a
man of character strength and moral goodness. My dream was to escape from the
totalitarian system to a free world. I thought that if I live in a free
society, is well educated and have lots of money, I can realize my dreams.
My intellectual adventures led me, somehow, out of the deprived oppressive
environment -- thanks to my father's upbringing, my mother's loving nurture and
helps from teachers and friends. I did fulfill the three conditions: freedom education
and a decent income. Yet, I seem to have discovered on myself more and more
character flaws and moral weakness. How come? I was baffled. I tried to find
answers in behavioral science, self-help books and psychology. But it seems to
be a quicksand in which my soul was drowning. No kidding, I was deeply
troubled, depressed, losing hope.
Besides books and philosophy, I also tried sports: triathlon, half marathon,
winter triathlon. They gave me temporary thrills but no lasting answers.
I became more disappointed of myself. My self-esteem began sinking lower and
lower in the quicksand. I sought help from a psychological counseling. A lady
named Cynthia provided a good deal of much appreciated clinical help. But the
real question was un-answered. I began to lose purpose and losing it quickly. I
was at my wit's end, unable to sit up in the quicksand.
One day I went to a wedding banquet and met a United Church minister, Rev Wing
Mak. He challenged me to turn my eyes to Bible. Prior to that I was drawn to
Bible study while attending graduate school in Vancouver. Rev Mak was very nice
to me. He filled to some extent a father-like role at that point when my father
had been far away, distance-wise, and, more acutely, emotion-wise. Overtime, to
my delight I found that reading Bible seemed to make my inner world clear. I
learnt that I am one of the sinners made in divine image whom GOd is ready to
forgive and take back. This explained why I was foolish to rely on my strength
to achieve moral goodness. When I read Bible, not only were there instructions
beaching me how to deal with daily practical problems (like re-connect with my
estranged father). The mystery of the Bible seemed to be able to bring strange
unexplainable joy and peace to my inner self. Joy and peace, how precious to a
man in depression! I used to get up every morning, reading Psalm 143 and plea
God: may each morning bring me, word of your unfailing love!
Surprisingly, much of my prayers got answered, so in keeping up with my side of
the bargain, I somewhat reluctantly submitted to Jesus.
A small act of submission to Jesus brought new life. Trust and obey, there is
no other way, to be happy in Jesus, but trust and obey,
Bible taught me the purpose of life. Rather than relying on my own to become
righteous, it is better to trust in the Creator's plan and submit to Jesus for
the redemption of my sins. There trully were abundant life when I participate
in the worthy cause of being Christ's disciple. Live in Christ is a meaningful
one. I only regret that I didn't come to the cross sooner.
Thursday, July 9, 2020
C++ Value Categories: each C++ expression has a type and a value category - one of prvalue (pure right value), xvalue (eXpiring value) or lvaue (left value)
- a glvalue (“generalized” lvalue) is an expression whose evaluation determines the identity of an object, bit-field, or function;
- a prvalue (“pure” rvalue) is an expression whose evaluation either
| (until C++17) |
| (since C++17) |
- an xvalue (an “eXpiring” value) is a glvalue that denotes an object or bit-field whose resources can be reused;
- an lvalue (so-called, historically, because lvalues could appear on the left-hand side of an assignment expression) is a glvalue that is not an xvalue;
- an rvalue (so-called, historically, because rvalues could appear on the right-hand side of an assignment expression) is a prvalue or an xvalue.
xvalue
- a function call or an overloaded operator expression, whose return type is rvalue reference to object, such as std::move(x);
- a[n], the built-in subscript expression, where one operand is an array rvalue;
Sunday, July 5, 2020
Why a new architecture for OpenSLL starting OpenSSL 5.0?
Friday, July 3, 2020
Powerful New Tracing Tool: uftrace
- apt install uftrace
- compile version 3.0.0-alpha4 openssl with flag -pg
- Trace files will be in ufrace.data/ folder
- Parse the output by:
- download the uftrace profile data to path/to/project/ufrace.data/, the cd to path/to/project and invoke: uftrace replay.
uftrace record --nest-libcall ../openssl-cmake/build/usr/local/bin/openssl cms -cades -sign -in assertion_store.json\
-signer "rsa.signed_pub.pem"\
-inkey rsa.pem\
-outform DER -out signed_claim.p7s
And openssl CMS_sign has similar documentaitons. Not as easy as Win32 CryptoSignMessage() but high quality non-the-less
At line 54355, we invoke CMS_sign() with two flags: CMS_DETACHED | CMS_PARTIAL.
CMS_PARTIAL is required otherwise the manpage for CMS_sign() says SHA1 will be invoked to hash over claim_bio
We invoke cms_add1_signer() (line 74943, col 31 )
Which seems to call, at #146127 (col 62) call “cms_add1_signing_cert_v2()” . This will support CAdES-B format.
Finally we invoke, at #147594: CMS_final()