It is reported that ʿAlī b. ʾAbī Ṭālib – Allāh be pleased with him – said:

Do not be with the sinner (fājir), for he will beautify to you the things he does, and he will want you to be like him; and he will beautify to you the worst of his practices; and his entrance upon you and leaving from your company will cause ignominy and discredit [of you].

And do not accompany the fool (aḥmaq), for he will exhaust himself [to help you] but will not benefit you, and he may want to benefit you but end up harming you; his silence is better than his speaking, his distance is better than his closeness, and him dying is better than him living.

And do not accompany the liar, for life will not benefit you with him, he will tell others what you say, and tell you what others say; and if you speak the truth, it will not be believed.

It is reported that ʿAlī b. Abī Ṭālib – Allāh be pleased with him – said:

Blessings arrive with gratitude [to Allāh], and gratitude is connected with more [blessings], and the two are tied together: more blessings from Allāh will never stop unless gratitude from the servant stops.

It is upon whoever seeks knowledge to have a solemn, dignified demeanour, fearful [of Allāh]; and to follow in the footsteps of those who went before him.

ibid.

ʿAbd Al-Raḥmān b. Mahdī reports:

A man laughed in [the circle of] Hishām Al-Dustawāʾī, so Hishām said to him, “Young man! You seek knowledge laughing?” He replied, “Is it not Allāh who makes [us] laugh and cry (as stated in the Qurʾān)?” So Hishām replied, “Then go and cry.”

Op. cit. 233

Ismāʿīl b. Yaḥyā reports:

Sufyān once saw me joking with a man from Banī Shaybah at the House (Kaʿbah). I laughed, so he said to me, “You laugh here? A man used to hear a single ḥadīth and its demeanour and guidance would be seen on him for three days.”