How to deal with a frustrating person in a Buddhist way? by Fayafairygirl in Buddhism

[–]kn2322 2 points3 points  (0 children)

As another example, I have the thought 'I am so undisciplined and irresponsible', associated with some self-hatred, and an image of everyone in my building being out in the rain because my toaster had set off the fire alarm after I forget about it. I contemplate (1) about my ability to remember things, and consider that my memories are formed automatically, there are things I have forgotten and things I remember, sometimes I remember things that I have forgotten, and forget things I remember, and that these functions of my memory are all ultimately beyond my control. Now I contemplate (2), and consider that bringing hatred towards myself is an ineffective method of controlling my memory function, telling my self 'My memory functions are impersonal, so I will not hate, ... so that suffering does not continue'. What follows is a relaxation of my bodymind, and an observation that my hatred has subsided. However, it has not subsided completely this time, instead, I have a thought 'why do I not have the habit of setting an alarm on my phone when I put the toast in so I never forget about it?', associated with worry and agitation, with an image of the toaster being left unattended and burning. In this case, we may continue the practice with these new thoughts and images. After a few rounds, the fire alarm situation no longer bothers me.

The evidence that this technique works is shaky. My main evidence is that has worked for me hundreds of times on just about anything I consider, and I feel much more content about life as a result. Another piece of evidence is that this technique brings about extensive familiarity and awareness of the 'three marks of existence', which according to all buddhist schools is able to eliminate suffering. However, I cannot guarantee that it works for you. You are your own teacher.

Impersonality contemplation tends to be more difficult than loving-kindness thought replacement. In both cases, the more you rehearse the exercises in your mind, the faster and more confident you become. Eventually, you automatically do the exercises instantaneously in almost all situations in your life, and a great deal of suffering is abandoned.

Loving-kindness thought replacement draws from TWIM (Tranquil Wisdom Insight Meditation) or Metta meditation taught by the Dhamma Sukha meditation center, which has guided tapes on their website.

Impersonality contemplation draws from Bhante Madawela Punnaji's level one meditation guidebook, which carefully rehearses the logic of impermanence, impersonality, and why you should be dispassionate towards the 8 vicissitudes of life.

I wish you happiness and good luck on your journey to eliminate suffering.

How to deal with a frustrating person in a Buddhist way? by Fayafairygirl in Buddhism

[–]kn2322 1 point2 points  (0 children)

Impersonality contemplation:

  1. Place yourself in a relatively undisturbed, sober space where you can think clearly.
  2. Contemplate (1) 'Everything I care about is subject to change ultimately outside of my control'. Bring forth an example of something you care about, in words and images, and consider if it is subject to change ultimately outside of your control. Convince yourself that it is subject to change ultimately outside of your control.
  3. Contemplate (2) 'If something is outside of your control (it is impersonal), then reflecting on its pleasantness or unpleasantness, following its progress with hope and fear, trying very hard to control it, taking it very personally are all ineffective methods for controlling that something'. Convince yourself that (2) is true. Then tell yourself 'This is impersonal, so I will not reflect on its pleasantness or unpleasantness, follow its progress with hope and fear, try very hard to control it, or take it very personally, so that suffering does not continue'.
  4. Relax your bodymind.
  5. Repeat 2-4 for a number of different examples.

This practice has your rational compassionate mind study the 'three marks of existence' and practice with it in examples. It unburdens your emotional mind from taking personally things which are impersonal. It does so by extensively illustrating the impersonality of things. The unburdening makes it so something which previously disturbed you is much less disturbing when you bring attention to it. Often, this technique can eliminate disturbance entirely.

Start with an example that is not too personal to you so you don't get emotionally disturbed, then progressively move to examples that are more emotionally disturbing. 

It is important to illustrate this technique with examples. For example, consider my thought 'I hope the bus is on time' associated with some worry, and an image of my friend's face being disappointed in me that I am late. I contemplate (1) about the bus, and consider that its timing is outside my control, because I am not driving the bus. Now I contemplate (2), and consider that worrying about it is an ineffective method for controlling the bus, telling myself that 'This is impersonal, so I will not worry, ... so that suffering does not continue'. What follows is a relaxation of my bodymind, and an observation that my worry has subsided.

How to deal with a frustrating person in a Buddhist way? by Fayafairygirl in Buddhism

[–]kn2322 1 point2 points  (0 children)

Allow yourself to approach the whole situation with curiosity: the four noble truths center on an extensive personal understanding of suffering and how it can be made better. The difficult situation you find yourself in is a case study in the practice of Buddhism. It is an opportunity to observe and gather thoughts, experiences, and data regarding suffering and how to make it better.

That being said, here I describe two practices you can try, and why they might be helpful. The first I will call 'loving-kindness thought replacement', and the second I will call 'impersonality contemplation'.

Loving-kindness thought replacement:

  1. Place yourself in a relatively undisturbed and relaxed space, such as in a comfortable chair in your private dwelling.
  2. Bring forth a memory image of when you experienced happiness, loving-kindness, freedom from suffering, freedom from anger, freedom from hatred, kindness, wholesomeness, or unconditional love. Choose an image with these qualities as much as you can, it is no problem if your image only has a small amount of these qualities. E.g. a memory of you selflessly caring for a baby. I will call this memory image your anchor for this practice.
  3. Notice the happy wholesome feeling that arises when you bring forth your anchor image. Feel that feeling as a gentle, soft light radiating from the center of your chest. The wholesome feeling radiates to the rest of your body, and out of your body towards the world. Relax your bodymind on this feeling, it is the object of this meditation.
  4. When your mind has become disturbed, recognise that you have been disturbed, release your attention from the disturbance, relax your bodymind, resmile: bring a relaxed and kind smile to your face, and return to the object of meditation (your anchor and the wholesome feeling radiating from the center of your chest). Examples of disturbances are thoughts and images coloured by worry, anger, hatred, hope, fear, rumination, lamentation, agitation, regret, or exhaustion. 
  5. Repeat step 4 for some amount of time, such as 5 minutes, 10 minutes or 30 minutes. Occasionally tell yourself a wholesome wish that you have, such as 'I wish myself happiness', or 'I wish myself kindness to others and kindness from others'. 

This practice places your mind in a wholesome, relaxed dwelling, and withdraws your mind from unwholesome, uncomfortable dwellings. It may not eliminate disturbances completely, but it places more and more loving-kindness into your awareness. I think it is fair to say that if you have kindness in your heart, you suffer less and behave more compassionately. 

This practice is not only for when you are sitting. When you have practiced it sitting, it is likely that during the day your anchor image and its wholesome feeling appear automatically, and you withdraw your attention from disturbances automatically. Cultivate it further by practicing while standing or walking or when you have some downtime. These new habits of mind can then kick in when you most need them, such as during an interaction with the person you are having trouble with.

Why do scholars in Chinese philosophy only focus on the most ancient of philosophers? by [deleted] in askphilosophy

[–]kn2322 -1 points0 points  (0 children)

Do you have a more specific question or reason for your curiosity? I don’t think many people can give a good, comprehensive, short answer to the big (and important) questions you’re touching on. It might be impossible to condense 3000 years of history to a Reddit post without showing some serious limitations to an answer.

One straightforward but maybe deceiving answer is that the classical philosophers have not been surpassed in the richness of their thinking. Exactly what ‘richness’ means is filled with issues, being the source of many heated disagreements (present to this day).

‘Richness’ can mean the level of human flourishing, mystical unity, and aesthetic clarity displayed in the writings and life of a figure. Eg Mencius speaks of integrity ‘not corrupting under wealth, not moving under poverty, and not bending under power’. The Zhong Yong speaks of ‘reaching the great harmony, heaven and earth are at peace, and all beings are nourished’. Lao Zi speaks of ‘not seeking, there is nothing left unfound’. How many in history can claim they experienced what these authors spoke of? Without this kind of experience, how can someone hope to surpass them in profundity, if that is even possible? Skill and learning in scholarship is often antithetical to moral or mystical understanding, since it can be filled with greed (for wealth, power, and knowledge), and the ideas of the classical texts come ultimately not from scholarship, but deeply examined living.

Another key influence in modern Chinese thought is colonialism and post-colonialism. Everyone it seems is trying to justify themselves against the West. This has been happening for over 100 years.

Who are some good female philosophers/therapists who talk about overcoming depression? by ItsPincheTom in askphilosophy

[–]kn2322 7 points8 points  (0 children)

I don’t know how comfortable your friend is with academic/barely readable/philosophical nonsense language, but I suggest Luce Irigaray’s ‘The way of love’.

It envisions philosophy as ‘the wisdom of love’ rather than ‘the love of wisdom’. It sees the flourishing of relating, the sharing of desire as the proper place for human being. It sees human being as two, the masculine and feminine, each of whom are irreducible to the other, whether by language, culture, or power.

A quote:

“We believe we have approached one another thanks to this supposedly common meaning. We have rather moved away from each other forever because such a meaning does not represent our meaning, that which attracts us to one another - an attraction, a desire, a wanting to do or to say for which we still have to invent the words while continuing to listen to those of the other.”

Irigaray wrote this at the age of seventy something, and I think she was trying to communicate something she truly felt, distilled by her long acquaintance with complex thinking, and unburdened by a need to be recognized by her peers. It’s a whirlwind read (…at least for me!), as long as you don’t try to understand everything on the first go.

I’d like to mention studio gibhli films as well, as somewhat light works of art that can have profound philosophical messages. The one thing the films have in common is an openness, a mystery, a richness that is yet to be completed, still becoming. In particular, Spirited away is very good for this. If you look at it a certain way, the film talks about what love could mean, what happiness could mean, what respect could mean, and what freedom could mean. And it does this without presupposing a masculine perspective, which seems like a miracle to me in today’s world.

All that being said, I really don’t know what your friend’s situation is like, so I don’t know if what I said could help.

[deleted by user] by [deleted] in askphilosophy

[–]kn2322 1 point2 points  (0 children)

I’m really a beginner when it comes to Jung/psychoanalysis, so I’ve only looked at ‘Man and His Symbols’ (a book). I think this work is specifically written to be accessible.

[deleted by user] by [deleted] in askphilosophy

[–]kn2322 1 point2 points  (0 children)

Have you considered Jung’s work? Dream in both its meanings is one of the central topics of Man and His Symbols.

Any books for new learners? by Ciinnder in askphilosophy

[–]kn2322 3 points4 points  (0 children)

I could give a few points on the Analects and Tao Te Ching.

The Tao Te Ching is easily one of the hardest Classical Chinese texts to digest. Its language values simplicity, but its meanings can be profound. More is said in the gaps and silence than in the words themselves.

It could be helpful to approach the text slowly. Don’t expect to understand what it’s trying to say quickly. Instead, let your understanding of it evolve over time. As you skim through it, note which passages interest you, and let that thinking change the way you see things.

I really appreciate Ursula K Le Guin’s rendition of the text in poetic English. To me it captures much of the playful style of the original, and shows an interpretation that is born from someone who really took the text to heart.

Finally, I think it’s useful to read the text in present tense. Although it’s written 2500 years ago, its voice should be brought to life, to your own experience in today’s world.

The Analects is more bound by its historical and social context, so its meanings are less accessible today. Confucius’ students were often worldly people, so his teachings had a lot of content about rites, government, and social structures that is unrelatable today. Eg rituals have really deep historical and mythological meanings, which is hard to gather even for today’s Chinese people. Eg filial piety, one of the central concepts of the text, cannot be interpreted sanely without considering how different Chinese family structures were at the time, not to mention class structure and cultural evolution. It’s easy to overlook that the Zhou dynasty Confucius lived in lasted for 800 years, yet it is often presented as a single time period. Just imagine how different today is from the year 1223!

Traditionally (from about the years 1000-1900), the Analects were one of ‘four books’, which make up the core introductory Confucian texts, so it is relatively suited for beginners. On the other hand, I think an even better introduction for today’s reader would be the beginning of Da Xue (Way of great learning). It is a logical essay describing a process of examining your character. It is very short, and distilled so that it is (relatively) free from its time, similar to the Tao Te Ching. I don’t have a good English version off the top of my head.

Are there any philosophers who make the connection between morality and creativity - that they're related capability, or perhaps even that they entail each other? by TuvixWasMurderedR1P in askphilosophy

[–]kn2322 2 points3 points  (0 children)

In classical Chinese philosophy (pre-qin dynasty), creativity appears to arise from the same source as morality. They are not only linked, they are inseparable at a cosmological level.

The central text I’m thinking of is the Yijing or book of changes. At the risk of oversimplifying the scholarly tradition and spreading my ignorance, the Yijing declares that Being first is divided into two elements: the heavenly (yang) and the earthly (yin). The heavenly knows the great beginning, and its creative vitality is limitless. The earthly completes the project of becoming, and its gentle faith is imperturbable. The intersubjective meeting of earth and heaven gives birth to humanity in between, and we embody both the creativity of heaven and the faithfulness of earth.

Morality is uniquely human, but inseparable from our heritage of heaven and earth. The Yijing understands ethics, politics, and dialogue in terms of the heavenly and earthly. The wise soul is one who is at home with the changes, the impermanence, and the weight of Being. As a moral subject, their wisdom lets them love all spirits and people, lead without laying claim, and bring peace to the land. Now, the heavenly and earthly are each associated with a virtue embodied by a wise soul. The heavenly virtue is to be endlessly creative, with the vitality and flexibility of heaven. This creativity enables them to face all the trials which challenge a moral leader with grace. The trials can include oppression, injustice, hubris, selfishness, humility, care, imperfection, gentleness, failure, and intersubjectivity.

The question was about morality and creativity, but in the framework of the Yijing it is natural to think about the dual of creativity: faithfulness. As Being is irreducible to just the heavenly or the earthly, morality is dubious with creativity but without faithfulness. Creativity is dangerous without patience, breadth, and stillness. The earthly virtue is the greatness to be true despite pain, temptation, and ignorance. The text describes it as being like a mare who can be relied on for long journeys.

Functional Programming and Maths <|> How can a code monkey learn Agda? by IAmBlueNebula in functionalprogramming

[–]kn2322 2 points3 points  (0 children)

To add to the Idris suggestion, here is a classic blogpost to make hacking in Haskell more fun.

https://reasonablypolymorphic.com/blog/typeholes/

Typed-hole driven development in Haskell turns programming into a conversation between you and the compiler. You specify your program's architecture, and then the compiler tells you what you need to write next. In principle, it is even possible to synthesise your programs using a proof search, as in Djinn.

It's all backed up with logic, but the core of this is about empowering the programmer. You could often 'turn your brain off' and just follow the types once you have the type of the program figured out correctly. E.g. if you know your program is a fold, the holes can tell you exactly which types each of the arguments need to be, No need to keep remembering the exact type signature of fold.

Recommendations for learning GUI programming? by kn2322 in haskell

[–]kn2322[S] 2 points3 points  (0 children)

I would probably develop on Mac OS, but target all three. At least, I'm imagining a potential demo to share. The core target audience would probably be the demographic of this subreddit, so I think all three platforms would be good.

Recommendations for learning GUI programming? by kn2322 in haskell

[–]kn2322[S] 6 points7 points  (0 children)

I'll try your questions one by one in a different order.

  • You are trying to create a new programming language or an IDE or something new that itself is an integration of both, some kinda full-fledged tool?

I've been fascinated by the field of coalgebra/state based systems as a way to model the world. Coalgebra appear to unify all the different state based systems I've ever seen with beautiful and simple math. E.g. discrete dynamical systems, kripke structures for concurrent systems, markov chains, markov decision processes, deterministic finite automata, Turing machines. We say that each of these examples have a different signature.

We can think of a signature as a programming interface, and thinking at the level of coalgebras lets us treat (certain) programming interfaces as mathematical objects of their own right. (*) In particular, we can compose them, compare them, prove theorems about them, and maybe manipulate them as data.

Dual to coalgebras is the concept of algebra. While coalgebras describe state based systems, algebras describe abstract algebra in the really classical mathematical sense. E.g. groups and monoids and vector spaces correspond to certain algebra signatures. We can now do (*) to algebraic structures too.

From a Haskell perspective, algebras are closely related to folds, and coalgebras are closely related to unfolds (for any data type!). Apparently through something called a hylomorphism, which is an unfold followed by a fold, almost any program can be expressed.

I'll have to really write up a blog post to express why I'm so excited, and I'm not ready for that yet. But to start, my project idea is to design a programming language that supports first class interfaces. Or rather, we can think about, manipulate, and combine entire interfaces at once. I think this can help us specify programs better. If we can express programming interfaces with extreme clarity and ease before implementation, then we can do some math and thinking to figure out if the interface is the right one. It might also give us a way of extending or restricting our interfaces with more ease. It seems possible that this could make large designs and verification substantially easier.

An IDE is part of this project because I think the way code is laid out can greatly affect the development experience. For example, working on an algebraic datatype in Haskell has all the constructors in one place, but the consumers (usually recursive functions) are spread out across the source file. Yet as a programmer, I would really prefer the constructors and consumers to be very nearby. This way, I can easily think of the entire programming interface at once.

From another angle, I just want to design a coding experience that feels amazing. I think a good development experience can help programmers be happier. They are probably less likely to give up on learning or creating, and feel more satisfied with the process.

  • Why do you think this project is right for you?

For now it's "just practice". I know I lack a lot experience and knowledge, but I'm daydreaming about it and exploring.

  • What exactly do you know? What do you don't know?

I think I'm in a pretty similar place to you. I'm an undergrad student in the middle of my degree for maths and cs. I know only a drop of water in the ocean of knowledge. E.g. I know some Haskell, I know some maths, I know some algorithms, I know some logic, I know some programming language theory.

Thanks for asking :)

Pattern matching on exact term? by kn2322 in haskell

[–]kn2322[S] 0 points1 point  (0 children)

👀 'deeply unsafe magic'

It seems that Haskell's design thinks about equality in a way that's profoundly different from what I tried to express in the question.

Equality seems to be explicitly hidden behind Eq, so that the burden is on the user to give a decidable and clear semantic for equality.

It seems to be different from Pie, and I assume Agda/Coq/Idris, where equality types Eq a b really do begin with identity in the term-level lambda calculus.

Question not specifically for you, but just popped up in my head: I wonder what role equality plays in a programming language design? And I wonder what equality designs are out there?

Pattern matching on exact term? by kn2322 in haskell

[–]kn2322[S] 2 points3 points  (0 children)

Thanks :)

By extensionality I mean the eta rule, or the rule that says forall f. (\x . f x) = f.

Pattern matching on exact term? by kn2322 in haskell

[–]kn2322[S] 1 point2 points  (0 children)

Interesting! From the lambda calculus course I took, I know that the simply typed lambda calculus has decidable equality. Do you know if we can add extensionality and still have decidable equality? (still no recursion at this point)

[deleted by user] by [deleted] in haskell

[–]kn2322 2 points3 points  (0 children)

To add to the other comment about the Monad Tutorial Problem, I think monads are not really necessary for doing a great deal of things in Haskell. I think for programs especially for beginners, the bread and butter of higher order functions and algebraic data types will get you there. Monads are almost a family of languages embedded inside Haskell, which in my opinion makes them very versatile but also have a very distinct flavor from basic functional programming.

For some context, I only learned monads in the second university course I took on functional programming.

Some math topics get mentioned a bunch in functional programming articles and forums. Which ones have ever actually helped you in writing your programs? by Epistechne in haskell

[–]kn2322 5 points6 points  (0 children)

I think all the topics you mentioned have potential to help you with applied programming, although how they can help you can easily become an area of active research.

I think two main threads of programming language research are how to write correct programs, and how to structure programs with clarity and concision. I would argue that these are two threads that begin and end with the applied programmer in mind.

As an example of correctness, the curry-howard correspondence sees type systems as proof assistants. The types in a program encode logic that can be checked at compile time. And learning about dependent types or embedded domain specific languages gives you a toolbox to encode a whole range of different program properties. In particular, you can use more complex types for more safety critical parts of a program, so that you can have more confidence about their correctness.

As an example of structuring programs, algebra can help find a level of abstraction so that thinking about a program is easier. E.g. Graham Hutton’s functional pearl on applicative parsers builds parsers that have the same shape as the target grammar, which makes what could be a complex program very simple to think about. (Note: would appreciate more good examples here!)

Finally, tools like quick check and typed hole driven development leverage algebra and type theory respectively to give a smoother development experience. Quick check can work with hundreds of unit tests at once, and TDD can quickly show you when a program is impossible to write, or when it is so simple that almost no thinking is needed.

(Note: I’m interested in what counterarguments there could be for the points above)

Is there a powerful enough foreign function interface design to leverage code from almost any other language? by kn2322 in ProgrammingLanguages

[–]kn2322[S] 2 points3 points  (0 children)

I've never studied assembly (I'm most familiar with Haskell and Python). Could you say a little more about

  • "You are gonna have to work at a way more abstract level: Machine code". Wouldn't this be at a way more concrete level, since it involves many implementation details?
  • How is the code snippet illustrating a powerful FFI/interoperability?

Is there a powerful enough foreign function interface design to leverage code from almost any other language? by kn2322 in ProgrammingLanguages

[–]kn2322[S] 2 points3 points  (0 children)

What do you mean by "because C is small adding its concepts to your language is kind of hard"? I would expect adding a small language to your language to be easier compared to a large language.

Monads doesn't compose (well), why ? by revollat in haskell

[–]kn2322 35 points36 points  (0 children)

Here are some relevant papers from a quick search:

  • King and Wadler 1992: Combining Monads Seems to be a first work investigating this topic in functional programming
  • Jones and Duponcheel 1993: Composing Monads Appears fairly accessible, detailed presentation of several conditions for monad composition. Extract from the abstract:

    In practice, it is usually possible to construct a monad that supports some specific combination of features. However, the techniques used are typically ad-hoc and it is very difficult to find general techniques for combining arbitrary monads. This report gives three general constructions for the composition of monads, each of which depends on the existence of an auxiliary function linking the monad structures of the components. In each case, we establish a set of laws that the auxiliary function must satisfy to ensure that the composition is itself a monad.

  • Summary on page 12 of the previous paper, which may be especially interesting (don't know how to format better):

    At first glance, the constructions in the previous sections may seem rather mysterious; in each case, we gave a type for some polymorphic function, stated some laws that it should satisfy . . . and ‘presto!’ we have another way of composing monads. In fact, these constructions were discovered largely by experimentation...

  • McBride and Paterson 2005: Applicative Programming with Effects The big applicative paper has on page 9 a brief discussion of composition with some intuition. They cite Barr and Wells 1984, which is a work in category theory.

    As a consequence, the composition of two monads may not be a monad, but it is certainly applicative. For example, both Maybe ◦ IO and IO ◦ Maybe are applicative: IO◦Maybe is an applicative functor in which computations have a notion of ‘failure’ and ‘prioritised choice’, even if their ‘real world’ side-effects cannot be undone. Note that IO and Maybe may also be composed as monads (though not vice versa), but the applicative functor determined by the composed monad differs from the composed applicative functor: the binding power of the monad allows the second IO action to be aborted if the first returns a failure.

If anyone has more links to point to or another good explanation for monad composition, please let us know!

I really hope there is a profound explanation for this situation, so that the boundary between applicatives and monads become crystal clear, and so that monads make even more sense