Better HN
topnewbestaskshowjobs
Log inSign up

rramadass

6,176 karma · joined Dec 4, 2018 (7y ago) · 4,222 submissions

https://www.linkedin.com/in/rramadass

===== Aphorisms, Maxims, Quotes, Sayings, Lessons =====

“Do you know, I sometimes catch myself wishing that I, too, were blind to the facts of life and only knew its fancies and illusions...that to dream and live illusions gives greater delight. And after all, delight is the wage for living. Without delight, living is a worthless act...your dreams and unrealities are less disturbing to you and more gratifying than are my facts to me.”

“I often doubt, I often doubt, the worthwhileness of reason. Dreams must be more substantial and satisfying. Emotional delight is more filling and lasting than intellectual delight; and, besides, you pay for your moments of intellectual delight by having the blues. Emotional delight is followed by no more than jaded senses which speedily recuperate. I envy you, I envy you.”

I am like a sober man looking upon drunken men, and, greatly weary, wishing he, too, were drunk.”

“Or like a wise man looking upon fools and wishing he, too, were a fool”

-- Wolf Larsen from "The Sea-Wolf" by Jack London.

"Better mad with the crowd than sane all alone".

-- Aphorism 133, "The Pocket Oracle and Art of Prudence" by Baltasar Gracian trans. Jeremy Robbins.

“Beginning to Think is Beginning to be Undermined.”

-- The Myth of Sisyphus by Albert Camus.

In this world whatever is gained is gained only by Self-effort; where failure is encountered, it is seen that there has been slackness in effort...Self-effort is that Mental, Verbal and Physical Action(s)...There is no power greater than right action in the present...As is the effort so is the fruit,..What is called fate or divine will is nothing other than the [fruit of] action of self-effort of the past. The present is infinitely more potent than the past. They indeed are fools who are satisfied with the fruits of their past effort (which they regard as divine will) and do not engage themselves in self-effort now...Self-effort has a threefold root and therefore threefold fruit — an inner awakening in the intelligence, a decision in the mind and the physical action...Self-effort is based on these three: knowledge of scriptures [i.e. study of books], instructions of the preceptor [i.e. from a Master/Teacher] and one's own Effort [Mental, Verbal, Physical]...And the wise seeker knows: the fruit of my endeavors will be commensurate with the intensity of my self-effort, and neither fate nor a god can ordain it otherwise. Indeed, such self-effort alone is responsible for whatever man gets here...Fate or divine dispensation is merely a convention which has come to be regarded as truth by being repeatedly declared to be true...In this world, except a corpse, everything is active and such activity yields its appropriate result.

All achievements are dependent upon four factors: Time, Place, Action and Means [employed]. Among these Action or effort holds the key because, surely, all endeavours towards the achievement are based on action or effort...In preparation, one should abandon all habits and tendencies that are unrelated to what one wishes to achieve.

One should become aware of one’s deluded notion in which one thinks that "I belong to these objects of the world and my life depends upon them. I cannot live without them and they cannot exist without me, either" [here objects can be anything that the mind latches onto i.e. animate/inanimate/thoughts/memories/etc.]. Then by profound enquiry, one contemplates "I do not belong to these objects, nor do these objects belong to me" [i.e. the difference between the experiencer, the object experienced and the experience itself]. Thus abandoning the ego-sense through intense contemplation, one should playfully engage oneself in the [everyday] actions that happen naturally [whether due to environment or self-initiated], but with the heart and mind ever cool and tranquil. Such an abandonment of the ego-sense and the conditioning is known as the contemplative egolessness.

Live in the present, with your consciousness externalized momentarily [i.e. egolessly immersed in the current activity for however short/long a time period] but without any effort [i.e. without fixating on the outcome]; when the mind stops linking itself to the past and to the future, it becomes no-­mind. If from moment to moment your mind dwells [only] on what is [currently being done] and drops it effortlessly at once [when it is done but before moving on to something else], the mind becomes no-­mind, full of purity.

They who, though remaining established in equilibrium, do not let their organs function naturally as long as the body is alive, are obstinate and stubborn people. As long as there is sesame there is oil; as long as there is the body, there are the different moods also. He who rebels against the states that the body is naturally subject to, cuts space to pieces with a sword [i.e. a futile and foolish endeavour]. The equilibrium of yoga is for the mind, not for the organs of action and their states. As long as the body lasts, one should let the organs of action perform their proper function [naturally; without desire/intent/volition], though the intellect and the senses remain in a state of equanimity. Such is the law of nature, to which even the gods are subject.

-- The Yoga Vasistha translated by Swami Venkatesananda.

To Get a reputation for being suspicious and distrustful is certainly not desirable. Nevertheless, men are so false, so insidious, so deceitful and cunning in their wiles, so avid in their own interest, and so oblivious to other's interests, that you cannot go wrong if you believe little and trust less.

-- Maxim 157, Maxims and Reflections (Ricordi) by Francesco Guicciardini.

=====

Submissions

comment 17h ago · link · parent

> If I understand contracts right, as in, that they're a basic form of dependent typing,

No, C++ contracts have nothing to do with the type system. It is purely predicate calculus using Hoare logic where subsets of state space are filtered from a larger program state space. The program is basically "steered" through the global state space using pre/post conditions.

Note however that theoretically (i.e. following from Curry-Howard correspondence) contracts can be thought of as dynamic counterparts to dependent types. But that is in a functional language with typing using constructive logic and not in an imperative language.

comment 17h ago · link · parent

Relevant to understanding the real-world benefits from usage of "contracts";

Catching Bugs Early: Validating C++ Contracts with Static Analysis - https://news.ycombinator.com/item?id=50379283

comment 23h ago · link · parent

I did not add the details since it was AI generated and so people can ask their favourite AI the same thing. Try it out; I did not realize so much of optimizations can be done under partial evaluation.

Note that most compile-time partial evaluation options are automatically included under -O3 switch.

Some of the techniques were interesting specifically profile guided and aggressive cloning based on hot paths.

Regarding libgccjit you are essentially right; basically you construct the IR for the active path with the runtime values as constants and then compile it in memory to get a pointer to the function. In that sense JIT is partial evaluation done at runtime.

comment 1d ago · link · parent

Hold Ledger is a tutorial on formal verification with Lynx and Lean 4 for developers who know Elixir - https://github.com/nshkrdotcom/hold_ledger
12345
141

5.

Lynx: Write proofs about Erlang/Elixir programs using Lean(github.com ↗)

3 points · by rramadass · 1d ago · 1 comment

comment 1d ago · link · parent

Note that C/C++ explicitly allows you to form a pointer to one past the last element of a string/array. You can compare with it but you cannot dereference it.

It is used extensively in STL algorithms so that raw pointers and container.end() behave the same.

comment 1d ago · link · parent

Just FYI - There is lots more that GCC can apparently do w.r.t. partial evaluation. Google AI mode gave me 1) Code level constructs 2) Compile time switches and 3) Runtime partial evaluation using "libgccjit"!

comment 1d ago · link · parent

[flagged]

comment 1d ago · link · parent

Then what in the world does "arising" mean here?

comment 1d ago · link · parent

Man, you can feel the author's angst through the article.

The atmosphere at the Institute became increasingly gloomy. People felt discouraged, hopeless; there didn’t seem to be any point in talking research anymore. I had looked forward to research collaborations with longtime colleagues; instead, we ended up sitting in adjacent rooms, each of us prompting an AI model.

Mathematicians/Researchers/Scientists really need our empathetic understanding as they try to figure a way forward without losing their identities.

comment 1d ago · link · parent

That is not Partial Evaluation but interactive REPL evaluation. See also https://news.ycombinator.com/item?id=50609165

For Partial Evaluation, you must generate a "residual" version of the original program by specialization where all static data is already bound and evaluated.

Simplest example would be compiling in configuration parameters, so a specific code-path is preselected before runtime. Another classic example would be C++ template meta-programming where that part of the program is not evaluated at runtime.

I first came to know of these techniques from the classic Generative Programming: Methods, Tools, and Applications by Krzysztof Czarnecki and Ulrich W. Eisenecker which is still relevant today.

Checking with Google, it seems GCC does not have a separate partial evaluator but one can use coding techniques+aggressive optimization switches to approximate it. For separate "Futamura Projection" like partial evaluators there seem to be C-Mix/LLPE etc.

comment 1d ago · link · parent

AFAIK, GCC toolchain does not have a separate partial evaluator, so how do you do it?

comment 1d ago · link · parent

Partial Evaluation - https://en.wikipedia.org/wiki/Partial_evaluation

Partial Evaluation and Automatic Program Generation by Neil Jones et al. - https://web.archive.org/web/20071012081310/http://www.itu.dk...

comment 1d ago · link · parent

"Embedded" has four distinct categories;

1) Embedded devices running fullblown OSes like Linux etc.

2) Embedded devices running realtime RTOSes like FreeRTOS etc.

3) Embedded devices where you do bare-metal programming.

4) Embedded devices using FPGAs. This is completely different from the above.

If you already know C/C++ you can transition to the first three above. Start with writing apps on the platform (with/without AI help). Learn to use tools like multimeter/oscilloscope/logic analyzer/JTAG etc. to gain visibility into and debug the hardware. This will make you comfortable with Electronics and Hardware which is the biggest challenge for software folks.

Note that "realtime" programming (soft or hard) is mandatory to understand hardware. This is the main difference between higher-level apps vs. embedded apps.

Learning to program FPGAs is a whole different ballgame altogether. They support what is known as "Reconfigurable Computing" so that you can implement whatever you need (eg. Neural-Network, Cryptography, Network accelerator etc). You will have to learn different HDL languages like Verilog etc. and how to run/test systems in a simulator. The thinking and development processes are quite different from "standard" software development.

W.r.t. to a career, your guess is as good as mine with all that is happening in the industry. However since there is actual physical hardware and a lot of complexity involved, a "human-in-the-loop" will always be necessary (AI cannot do everything) in the prototype-to-production process.

comment 1d ago · link · parent

No incentive is needed to ask the question but only for acting on it as i had already pointed out above.

Regardless, the onus is mainly on the student when it comes to his/her education.

comment 1d ago · link · parent

That doesn't make it right.

As pointed out, only a "complex system" (not any abstract/concrete structure) having specific attributes can give rise to emergent properties.

comment 1d ago · link · parent

No, Your inference is wrong.

comment 2d ago · link · parent

Nope. At any point in time an event may or may not occur. If it occurs then there could be multiple outcomes (probabilities) one of which actually happens. Reality is potentialities (not predetermined) out of which Time concretely realizes one path.

comment 2d ago · link · parent

Not "abstract structure" but a "complex system" - https://news.ycombinator.com/item?id=50596271

comment 2d ago · link · parent

Why?

comment 2d ago · link · parent

Your examples are funny ;-)

A video player has no consciousness as to what it is doing. It is a separate observer (i.e. you) who experiences passage of time and events in it by watching it play. The dynamism must be perceived by somebody.

W.r.t. The Matrix, you missed the point which i made in the very first line. If a group of people are bounded within a box then those people have a Reality which only turns out to be an Illusion when they compare it with somebody outside the box. That is what the philosophical quote implies.

comment 2d ago · link · parent

Reality does not have to be deterministic at every level. You can have indeterminism at the quantum level while being deterministic at the aggregate macro level (hence quantum statistical mechanics). Non-determinism allows for multiple possible paths to branch out from an event.

comment 2d ago · link · parent

The main issue is on how you define a "Type". There are two different logics here;

1) Classical Logic/Set Theory (this is the one you are talking about). Here Type = Set of values defined by membership rules (extensional/intensional).

2) Intuitionistic Constructive Logic/Type Theory (this is what is preferred for proof assistants). Here Type = Set of constructive (often inductive) proofs where the proof itself is the value.

As an example, think of defining the Type "Even_t"; under (1) it can be a predicate "x % 2 == 0", while under (2) it is defined inductively as "0 is Even_t; if construct(n) is Even_t so is construct(n+2)".

Notice that in the latter case a Type maps nicely into the idea of "a computation" and the fact that the very act of generation of one of its inhabitants constitutes "the proof" that the value has that property!

Whereas in Set theory Types are just subsets. But because you can mix anything into a set, an untyped term can be nonsense and will only get caught when you try to use it. Type Theory disallows it by construction.

This leads to the "Curry-Howard Correspondence" so you get a mapping between logic and type theory concepts - https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...

This idea of "Typing" can further be extended (with additions of Dependent Types etc.) giving a complex matrix of powerful Type Theories represented by what is known as "Lambda Cube" (https://en.wikipedia.org/wiki/Lambda_cube) and their implementations in proof assistants eg. Calculus of Constructions (CoC), Calculus of Inductive Constructions (CIC) etc.

Finally, note that not all proof assistants use constructive logic, several use straight ZFC/HOL. Amongst those that use constructive logic it is usually only the kernel (containing the Type System) which models it while the rest of the system still uses classical logic.

PS: See also the previous discussion Why is dependent type theory more suitable than set theory for proof assistants? - https://news.ycombinator.com/item?id=25167468

comment 2d ago · link · parent

The "illusion" of Reality as we perceive it should not be confused with the separate distinct Reality itself. Ontology and Epistemology are separate.

A great quote from Samkhya/Yoga philosophy is;

Objective Reality exists independently of the Mind because it is commonly experienced by others besides Oneself".

Your example of a circle/abstract things is not really logical. They are inert, while to even talk about consciousness you need dynamism i.e. passage-of-time, experience and cause-and-effect.

comment 2d ago · link · parent

Generally when people say "consciousness is an emergent property of life" they mean "at a certain scale and through specific combinations".

See also the recent discussion on The Evolving Story of How Chemistry Became Biology - https://news.ycombinator.com/item?id=50482222

The basic idea comes from "Complex Systems Science" (https://en.wikipedia.org/wiki/Complex_system) which studies systems as a whole whose properties cannot be predicted from knowledge of its components. The main factors to consider are scale, non-linearity, feedback loops, self-organization, adaptation/evolution, network structures, emergence etc.

So for example, a single bacterium cannot be said to possess "intelligence" whereas a whole colony of them do in the sense that they seem to act as an integrated whole "single" organism.

comment 2d ago · link · parent

The myriad types of techniques used in proof steps were already in the AI model's training data (from tons of ingested mathematical corpus). But whether AI was able to build something novel out of it using both probabilistic and heuristic methods remains to be understood.

It is also important to note that the proof was human guided (by a knowledgeable domain expert) and not autonomous.

comment 3d ago · link · parent

AFAIK, the value only lies in validating the capabilities of the model and using it for self-training. The various techniques used in the proof itself and any theorems dependent on RH being true can now all be built upon.

That may lead to something in the future where there might be an actual impact on the broader world.

Basically gym training and not yet a ring fight ;-)

comment 3d ago · link · parent

See my comments with resource links here - https://news.ycombinator.com/item?id=50031648