Monday, 13 January 2025

Singularity


It is always expanding.


Tracing it back to its source,

I move, asymptotically,

Towards the Singularity.


Always approaching,

never quite reaching.


Awestruck by its grandeour,

Humbled by its agelessness.


Knowing it is my source too,

This Infinite Potential Energy,

I am subsumed. 

Saturday, 9 March 2019

Veil

Behind the veil of reason
lives unfettered desire.

I can list a thousand reasons
For why I love You,
But they are all rationalizations,
Born after the fact.

I used to wonder
Why the Cosmos exist
Before I found You.

Tuesday, 30 August 2016

Mirrors

It wants to know itself:
It breaks in two
So one half can see the other

The parts want to know
Their selves in turn
And so they break again

They split in surreal ways:
They swirl and shine
They twist and ache
They lose themselves
In dense intense realities

Mirrors everywhere!
We live in them
And they in us 

Tuesday, 9 August 2016

Wind


Trapped in my own creation
Trapped feeling me as I am

But when the wind blows
It blows me and with me my sense of time

With lawless waves I sway
Feel myself ache in this wild display

This lamp is lit and burning
Fumes of fragrant oil

This canvas is drowning
In colours exotic and unseen

This brew is brewing
And feeling itself evaporate 

This instrument strikes itself
And in doing so creates itself

I burn brighter now and then 
To remind me that I am

Monday, 8 August 2016

Ring

Ring! Ring!
Buzz! Buzz!
Honk! Honk!

Pitter patter!
Old cheesy song.
Meadows radiating
Infinite shades of green.
Pitter patter!
Ring! Ring!


Stopped raining,
Silent, sleepy heads.
The window slightly open,
Cold, wet breeze.
Behind, a lady singing
a honey-sweet melody.

Buzz! Buzz!
Someone laughs at the back.
The wind feels so good.
Want more!
"Umm," (who's sitting before me?)
"Could you open the window more?"

Window slides.
Meadows open.
Hair. Nose.
The lady singing.
Smell of wet grass.
Glasses. Eyelashes.
Cold breeze.

Ring! Ring!
Do birds wonder
What we sing?
I hum to the wind.
Hair. Skin.
Cool breeze.
I sing to dream.

Tuesday, 12 July 2016

Sand

The sky was clear and blue with the sun beating mercilessly upon the drifting sands. There was nothing but sand all around for as far as eyes could see. A scorching hot breeze was playing with the powdery earth, sending it flying and swirling in mystical formations.

A pair of veiled eyes locked their gaze upon a dust devil gaining intensity upon a small dune to the south, tiny particles reflecting and bending the light, laughing irreverently at the lifeless expanse, itself a form of life from beyond mankind's wildest imaginations.

Those eyes were as calm as the desert sky in their gaze as they peered out the black burkha from the rear window of a black SUV - the last in a fleet of three as they scurried across the desert like a procession of shiny black scarab beetles. Her pupils were bright green like emeralds glowing in a cave, and even that much of green in The Empty Quarter seemed to lighten the mood in the vehicle somehow. No one ever spoke, except for quiet requests to be passed the flask of milk or water or the packet of dates.

"Would you like some dried apples, Zainab?" said a frail young man wearing a shabby white turban, sitting behind the driver, turning around nervously with a pack of sliced apples rubbed with a paste of poppy and saffron in his hands.

She took some slices without a word and started chewing on them mindlessly, then saw him looking intently at her. He jerked back, as if scared. She bobbed her head up questioningly, brows twitching behind the veil.

"Your eyes..." he said in a heavy, shaky, voice.

"Yes?" her voice was sweet like camel's milk, smooth like the finest hashish.

"They glow!" he said, shivering a little. Her lips veiled under layers of thin muslin curled up into a fox-like smile.

"They glow green like Gibrael's breath as he speaks the Quran to the Prophet in the blessed cave."

"What you see, Jamaal, is real." she says.

"I know." he says slowly.

"Never confuse truth with reality," she said soothingly, "truth just is, reality is what is perceived. Perceptions can be misleading because truth is strange, self-referencing, conflicting."

He nodded slowly, and settled back in his seat, looking at the sands, lost in thought. A strong wind blew against them and sand from the large dune they were climbing blew all around them. Jamaal felt a slight tap on his shoulder. He turned around. The girl's eyes were glowing even greener in the transient darkness that engulfed them, holding out her hands crawling with small white spiders glowing eerily in the light from her eyes.

"Consume." she said.

He grabbed some spiders without a word and chomped down on them and swallowed. They were salty and reminded faintly of spoiling goat's cheese. That was when he noticed the dog sitting calmly outside on the bonnet of the vehicle roaring upon the dancing dunes. It was a jackal, really - lean and black with a long nose and judging eyes.

"He got on when we left the rocks." she explained gently from behind.

"I've heard" said Jamaal after a few seconds of intense silence - "the Mad Poet was devoured by invisible beasts in broad daylight."

"Yes," she said, "in the bustling markets of Damascus. He was raving mad, too. One of the most feared blasphemers of his times. His mere presence was said to inflict damnation upon onlooking souls. Then Master took him."

"Aren't you afraid?"

"Of the Master? I sure am. He is whimsical, unreadable."

"The One with a Thousand Masks."

"Yes. He has no face. Do you know the tale of the Great Sphinx of Giza?"

He shook his head.

"It is very, very old, Jamaal. Older than you could possibly imagine. When Pharaoh Kephren found it four thousand years ago, it was already in ruins, face weathered and unrecognizable."

"It was ancient to the ancient Egyptians?"

"Yes. His true name is better left unspoken, for to name him is to invoke him and face his whims. He tells powerful secrets but leaves out crucial details. He delights in watching mortals fall prey to their own desires. He roars with mad laughter and it echoes in the desert at night, often accompanied by the muffled playing of a broken flute."

"The book..."

"That book is the most dangerous artefact known to our race. It is dangerous because it speaks of secrets that can destroy if not earned through great penance. Realities that can crush if learned without first understanding. There is a reason Master is also called Eater of Souls."

"He who laughs alone,
He who has no face,
He who should not be named,
The one with a thousand masks,
Eater of Souls... What other names does he have?"

"The Black Pharaoh. The Chaos that Crawls." Her eyes were glowing with supernatural energy despite the desert sun. Layers of muslin cloth fell to the floor, revealing her small pink lips, supple and faintly green from the glow from her eyes. Her toungue slipped slowly out the left corner of her mouth, coming out about four inches before twisting and going back through the right corner and disappearing into her again. "Master of Lies." she said, smiling.

"But he speaks the truth?"

"Half-truths, white-lies. Best of the best."

"Where are we going?"

"Wherever he takes us." she gestured for him to look outside. The dunes were shining like golden scales on a mythical, fantastic creature. A shimmer swept across them from the southwest to the northeast, and the cars slowly changed course.

At night, they camped down the windward side of a large dune. Stars shone brightly in the night sky. Jamaal sat by the fire next to Zainab. Her eyes were glowing very slightly. Some were eating beef curry with bread, all were talking in hushed voices. A short, stout old man with a thin beard was telling a huge baby-faced man how he had once heard of ancient cities lost under these sands.

"Why do insects kill themselves in the fire?" Jamaal asked.

"Their souls have been called for by The Master," Zainab smiled. "Once they have heard the call, they go in a frenzy and want nothing more than to immolate themselves and be one with him." she paused for some time. "The nomads say the sounds insects make in the desert at night are the echoes of the howling of djinns. We are His servants, all of us. Not much more than crickets in this limitless expanse of creation."

She moved closer - a lot closer, lips almost touching his ears, and whispered a short poem in between warm breaths in a language not from any reality he understood. It seemed to fill his head, roll around from one ear to another, increasing in pitch then falling so low as to make his heart shudder and induce a sense of immense dread. She spoke in rasping, guttural sounds that could not have possibly been produced from a human shell.

He didn't know what she was saying, but the meaning in those sounds was inherent, like a magical incantation. He felt thirsty - very thirsty. Thirstier than he had ever been before. His throat felt like sand-paper. It was parched and itching something awful. The sun was baking his skin, making it slowly tougher and sucking energy out of him that showed up as short-lived drops of cold sweat. Far away in the distance, he could see water shimmering. "A lake!" he thought, "If only I could reach it!" He walked mindlessly for hours, legs walking in the general direction of water, but never seemed to get any closer.

"He lies..." she said slowly, moving away from him, getting up, bowing a little, and walking into her tent. Jamaal sipped his tea, lay back on the mattress, and fell fast asleep. In his dreams, he saw a little girl playing with a furry rabbit under an apple tree on a mountain farm. She was feeding it nuts and wild berries and leaves, and it was gnawing away at them patiently, savouring every bite. It was wearing a small little blue bowtie that was easily lost in the carpet of little blue, yellow, pink four-petaled flowers.

After nibbling patiently at a leaf and some sniffing and looking around, it turned to the girl and said in a deep, gruffy voice - "The apples are ready."

"They are?" she said, amused.

"They are, my love. Very ripe, and begging to be gnawed at." Its crimson eyes burned with fire from somewhere deep inside the earth, and Jamaal blinked as his eyes fixed on the glowing embers that were all that remained of the bonfire. Everyone else was either in their tents or cars. A cold wind blew suddenly from the west, moaning and howling around him. His mind shimmered in resonance and he heard the rabbit's voice say -

"Nyarlathotep.
The crawling chaos.
I am the last, I will tell the audient void."

Thursday, 16 June 2016

No Rain

It should be raining like hell,
But the skies are too blue.
Nights are blue too.


Out of one trance,
I'm pulled into another.
Was I awake then? Am I asleep now?


Days are haunting, nights blinding.
Dreams, visions, phantoms, apparitions
Know no time, form, or colour.


What is the truth? Is it worth knowing?
Will it show the way?
Who, here, is sane?


If the cosmos are finite,
Whom do they dance around?
If infinite, at their heart would be you.


I see omens wherever I look.
They laugh at me,
And lie instead.


My faith is weary,
My soul is too.
What do I thirst for, if not for you?

Wednesday, 11 May 2016

Ants!

It was towards the end of March that R moved to Karkid. A friend had discovered and booked a small apartment near his office.
He was first startled by how close to work it was - there was his office, a church right next to it, a lane going in along the church boundary, and then a row of houses. If you walked a hundred meters into the lane and turned left, you would be standing in front of a building that had shoddily grown over the years into a four-storied troll.
On the terrace of this building, amidst dense foliage of neem and gulmohar trees through which you could make out the glowing blue cross of the church, was his apartment. A plain door led into a small room, which led into a small corridor that then opened into a small kitchen and another door that guarded a small bathroom.
Outside, the terrace was cool and breezy. He put his luggage in one corner, extracted a sleeping bag and a pint of cheap wine from his rucksack, and locked the door. He then made himself comfortable under celestial giants as they winked and teased from far away and before. He sat there, under a waning red gibbous moon, chugging at the wine.
He woke up only when the birds grew restless in the morning. He blinked, letting his filters kick in, and saw a jagged black line on the floor stretching from under the door to where he lay, and meandering around the bottle of wine that lay nearby.
The line squirmed and twisted in his blurred vision until his senses came to enough to perceive it as a regiment of determined ants that the wine had succeeded in seducing. He got up, unlocked, packed the sleeping bag, and sealed and kept the wine bottle in a corner of the terrace. He then got ready for work, and went out in search of breakfast.
He stopped at a small cafe in the lane where a group of men were having tea and buttered toast, and ordered the same for himself. While waiting at the wobbly table, he felt a sharp pang of pain a little above his right elbow. He yelled and jerked, and the waiter who had just arrived spilled tea onto his shirt. The group of men stopped chatting and looked around to see what the fuss was about.
He cursed under his breath, wiping his shirt with a wet handkerchief. He paid the waiter and rushed back to his apartment. His right hand was turning red and stinging in an unnatural manner. He left his shirt to soak in soap water and changed into another one before locking the place.
While passing the church on his way to work, he saw a weathered man of indiscernible age with a wild beard and covered in tattered old rags cowering by the footpath. Their eyes met for a moment before the man looked down, as if ashamed of the state he was in. R looked away and increased his pace.
He stopped only when he reached the office gates, and stole a quick peek around. The man had disappeared. He stopped, turned around, and searched the landscape. A cobbled footpath along a busy highway outside a solemn grey church - no broken man. Something compelled him to go back to the spot where the creature had been.
Strangely, all that seemed to be left of him was a pair of crumbling brown slippers, one of which was lying upside down. Not far away was a rather ominous looking anthill that induced nightmarish visions of a cave deep in the earth crawling with ants - sturdy hairy scissors determined to crush anything and everything regardless of proportion - in magenta and black and all shades in between - boiling with incomprehensible anxious rage that could fissure the crust in a fit of fiery hunger and infiltrate every higher organism in its path to devour only the mind, leaving flesh intact.
All creatures from rats and snakes down below to crows and sparrows in the trees - depleted of souls and left to be consumed by the earth in an attempt to regain some of the nourishment life had sucked out of her. The trees would sway on a perfectly still afternoon, for this nourishment would surely benefit those snobby patronizing immortals - and sunflowers. Of course sunflowers would attack fresh ground to aid in their eternal surveillance of the sun as it creeps across the sky. They would strike and grow when and where the gods least expected them to.
“He’s dead.”
With a turn of his head with such great rotational velocity that his senses had to struggle to catch up, R broke out of his trance.
“Wh- what did you say?”
“Are you alright? I said that man’s dead. That body’s been lying there since last night. Someone will inform the municipal corporation and they’ll take it away by tomorrow morning. What’s wrong?”
The man was wearing a black jacket with a yellow sign on a breast pocket that seemed eerily familiar - from a life he possibly couldn’t have had - from an age that could never be grasped by frail senses and instruments of perception. He backed up and turned around. Outside the church, on a white billboard in red letters, were the words HAVE YOU SEEN THE SIGN?.
R flinched visibly, his right hand collapsed into a tight fist, elbows swung, knuckles flew towards the man’s face, which exploded on impact and sent eyeballs and brain matter hurtling through the air.
“Aaaaaah!” yelled R.
The group of men turned to look what the fuss was about. The waiter had apparently spilled tea on a young bloke’s shirt who was wiping away frantically with a handkerchief.

Thursday, 14 April 2016

Spring in Mumbai


During the spring of 1925, from March 22nd to April 2nd,
"sensitive persons" dreamed deliriously of an Eldritch and non-Euclidean city and of the strange words - 
Cthulhu fhtagn


It was spring, and Mumbai was cooler than usual. A breeze was twisting, turning, and prancing playfully around crowded areas. The seaside was pleasantly warm and windy.
The sun, on its way down, had parked a little above the horizon, granting puny mortals one last chance to frolic as it sat watching, tired but satisfied with stuff in general.

A boy and a girl sat across the shorter side of an oblong table at a busy cafe. He looked like the apes he descended from - unkempt hair, bushy beard. She was like a small fox with a flowing mane. Both wore spectacles.

She had a ring on a finger on her right hand. It was golden, studded with small sparkling gems. The gold base twisted and folded upon itself in intricate and impossible knots, right out of Escher’s deepest, most vivid, but forgotten dreams.
The cafe was lit with Chinese lanterns hanging from the ceiling at different altitudes in different constellations.

“Note to self,” she said in her neon turquoise voice, “hide hands or wear gloves when you’re around.”
“Was that addressed to the world?”
“No, that was for me.”
“But you blurted it out.”
“I was thinking out loud.”
“You’re a note-blurter.”
“A what?”
“A note-blurter.”
“That’s mean.” she said, meditating on a brownie, “I signed up for Kickboxing classes. First thing tomorrow. 6 am.”
“Wait. Kickboxing?”
“Does that scare you?”
“Verily.”
“Already working, then. Interesting.” takes a sip of coffee. “How’s the new place?”
“It’s fine. Close to work, windy. Doesn’t have a water purifier, yet. Surviving on mineral water and mango juice.”
“I have to travel two hours to and from work - daily. You’re lucky. Didn’t you mention a balcony?”
“There’s that, yes. It’s actually an open terrace.” he said, fiddling with his glass of chai. “The sun has set. You want to head out?”
“Okay.”
They signalled a waiter for the bill, and unknowingly started a minor hustle among the waiting crowd.

The wind was sporadic in its movement, like an active child on an unusually strong sugar rush. The moon was big and red and gibbous, and it looked like a hare lay bleeding on its face. The tide was rising steadily, and waves were making a bit of a ruckus.
They were walking silently down the beach. He held her hand and brought it up to his face. Glimmering brightly under the crimson moonlight, the ring seemed to have come alive. A creature of light and void, it danced and changed form like a school of small shiny fish.
The wind grew stronger. Her hair whipped both their faces. A faint sound of muffled drums came gliding hypnotically from an indiscernible direction - DUB TUP DUP - DUB TUP DUP - accompanied by the wail of a broken flute.
The moon seemed to be emitting a long green trail of smoke and an aeroplane flew somewhere in a particularly loopy part of space emitting a drawn out sonorous moan that seemed to say - Cthulhu fhtagn - reminding the cosmos.
Something of unimaginable proportions rumbled in the depths of the Arabian Sea, sending large waves crashing upon themselves and flocks of pigeons flying into the infinite.


"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents."
- H.P. Lovecraft

Saturday, 21 November 2015

Vartalaap

यार मुझसे कहता है के
सुन्ने वाला भी मैं हूँ  |
अंदर देखो, आँखें खोलो,
रूह और परछाई मैं हूँ  ||

जंगल के हर फल में मैं हूँ,
तक़दीर के हर पल में मैं हूँ  |
सावन के हर कल में मैं हूँ,
रेशम और मलमल में मैं हूँ  ||

- . -

yaar mujhse kehta hai ke
sunney wala bhi main hoon |
andar dekho, aankhein kholo,
rooh aur parchhai main hoon ||

jangal ke har phal mein main hoon,
taqdeer ke har pal mein main hoon |
saavan ke har kal mein main hoon,
resham aur malmal mein main hoon ||

Saturday, 1 August 2015

Go Play

I've been reading up on core.async lately, mainly because of its shared semantics with Go and alleged benefits of the CSP model.

The literature around core.async is a little sparse, though it is simple enough to pick up.
The main benefits (as I understand them) are:
  1. Uses lightweight threads for concurrency
  2. Redeems asynchronous code from callback hell 
Time to see it in action:

(require '[clojure.core.async :refer [chan go alt! >!]])

(def even (chan))
(def odd  (chan))

(go (while true
  (alt!
    even ([v] (println "Got" v "from even"))
    odd  ([v] (println "Got" v "from odd")))))

(go (doseq [i (range 0 10 2)]
      (>! even i)
      (Thread/sleep (rand-int 1000))))

(go (doseq [i (range 1 10 2)]
      (>! odd i)
      (Thread/sleep (rand-int 1000))))

Here's what's happening above:
We create two 'channels' - even and odd
Channels are very much like queues or conveyor-belts in that we can insert values on one end and retrieve values from the other.
We then create three asynchronous processes using go blocks -
  1. The first process has an infinite loop that 'listens' to our channels using alt!. If either of the channels has received a value, it prints some information to the console.
  2. The next two processes produce numbers from 0-9 at random intervals and put them on corresponding channels using the >! operator.
..and this is enough to get started!

In the real world, we can use channels to listen to changes in state such as mouse moves and key events, and update state accordingly. I might write a game using core.async soon.

This was fun!
---

EDIT: Find this and other core.async examples here.

Monday, 20 July 2015

Prime?

Today I found something called Wolstenholme’s theorem, which says: 
For a prime p > 3, the numerator of H(p-1) is divisible by p^2,
where H(n) =  1/1 + 1/2 + ... 1/n

Here's a function (in Clojure) to test whether a number is a prime based on the above:

(defn harmonic [n]
  (apply + (for [i (range 1 (inc n))] 
             (/ 1 i))))

(defn possibly-prime? [n]
  (if (< n 4)
    (or (= n 2) (= n 3))
    (-> n dec harmonic numerator (mod (* n n)) zero?)))

PS: Thank you Colin Wright for the corrections.

Friday, 10 July 2015

Them

They were puppet masters of the first order, 
with thick supply of slimy hands that rose menacingly from their pulsating innards
and shone dimly with viscous Ichor. 
They did what they wished to do - destroyed what they disliked,
reproduced what they thought proper.

They had countless faces, each more captivating than the last, 
with searing fury and wrath itching behind their deceptively thin hides. 
They consumed the finest and the filthiest, 
growing twofold with each burp
 that made hills with frozen tops shiver and shudder.

They had a billion eyes that were almost always watching. 
They saw but didn't observe at times, and at times tortured entire communities. 
What they sought, we can only wonder, but it was not to be found here,
amidst sprawling meadows and bubbling brooks, 
for they are antitheses.

They came from somewhere deep in space. 
They poisoned our environment, spread vicious diseases, mutilated our land, 
and gave us gold and fish for our troubles. 
They never went back - just took to resting 
in this hopeless nauseous world they had created and seemed to tolerate.

Saturday, 4 July 2015

Jadugarni Alisha

I was supposed to go down to Hardoi to deliver some papers to the bank. I was seated comfortably in the cab, reading an interesting article about the Gita on the daily.

Hardoi is a small town in the backwaters of Uttar Pradesh and is a three hour drive away from Lucknow. I had been there once or twice before quite some time back, and remembered it as a queer old laidback town with decaying Mughal architecture and big, sprawling gardens. Someone had told me it was where the story of Hiranakashyap and Prahlad was based wherein the snobby king had been murdered by Lord Vishnu in his Narsimha avatar, ending his wicked rule.



As soon as I was free from the bank, I went to a small, bustling eatery and had a plate of puri-bhaji and a serving of the famous Sandila laddus. Afterwards, I strolled around the market smoking a cigarette I had bought at a paan shop on the previous crossing, paan in mouth.

After wandering around for some time, I saw a vendor selling haula peanuts in front of a dilapidated old building, and went to have a look. After asking the man to pack a good helping, I noticed a poster on the wall behind him. A crowned golden fish on a red backdrop was painted on the top left corner.’Jadugarni Alisha’, it said in bright rainbow colours- ‘Daily shows at 11:00 am, 1:00 pm, and 5:00 pm, Dream Theater’.

This piqued my interest, I took a look at my phone for the time. It was half past four and I was wondering whether I should go. Having nothing else to do and a heightened curiosity, I decided on a whim - “What is the way to Dream Theater, bhaiya?”



I bought a ticket at the counter, and entered a small dim-lit hall with shambly seating for twenty to thirty people, and a circular dais on one end. The red wall behind the dais was adorned with the same golden fish from the poster. I was alone and took a seat in the second row on the right, lighting another cigarette and opening the bag of peanuts.

By the time it was 5, eight to ten other people had come and were sitting haphazardly around the place. A light focused on the dais came up, and the rest of the room became pitch-black. A low drumming sound started echoing through the room, and a girl in her twenties wearing a large cloak and red hat with the fish entered the spotlight and stepped up on the dais. She had bronze skin and from her looks I guessed she was Bengali.
Jo dikhe aaj yahan, shak se naa dekhein usey. 
Ye aankhon ka dhoka nahi, ufanta sach hai.
(Do not doubt the authenticity of what you see here today.
This is revelation, not illusion.)

I was a little unnerved by this. I had expected an under-educated small-town girl doing run-of-the-mill tricks, but here she was - talking mystically in poems. I was probably frowning at this point, and I imagine I saw a hint of a smile when she looked my way.

I turned to look at the other people in the audience, but the hall was too dark and my eyes had adjusted to the light in front of me. I straightened up a bit and redirected all my attention towards this mysterious being.

She was now standing with her back to the audience, arms spread out like The Redeemer, head tilted back a little.
Ia!
The light falling on the podium started flashing, taking various colours. The room was silent and had an intense atmosphere. I could hear, or thought I could hear crickets chirping in the darkness around me.
Ia! Shub-Niggurath!
This incantation caused a flurry of confused emotions in me, and I could feel my stomach sink. Had I ever heard it before? I probably had, in whispered voices around a bonfire in Manali, from a group of Syrians who had travelled along the Rub’ al Khali.
Ia! Yog-Sothoth!
The lights were dancing like a whirling Dervish.
Mrit nahin voh - jo sadiyo jama hai,
Kuchh sadiyo mein toh maut bhi fanaa hai.
(That is not dead which can eternal lie,
And with strange aeons even death may die.)

The noise of chirping crickets had gained a startling intensity, and was ringing sharply in my head. It seemed to be malevolent and mocking, like shrill laughter echoing in a cave.
Yog-Sothoth dwar hai, aur Yog-Sothoth kundi.
Sab samay aur sthaan Yog-Sothoth mein ek hain.
(Yog-Sothoth is the gate, and Yog-Sothoth is the key.
Time and space are one in Yog-Sothoth.)
Aieei-k’tay, Yog-Sothoth, 
Aieei-k’tay!
Her arms were flapping around as if they were made of rubber. They seemed to be loosing shape, and taking on a glossy, slimy texture. Her hair were flying about, but there was no wind. Crickets were threatening to rupture my eardrums.
Ia! Ph’nglui mglw’nafh Cthulhu R’lyeh wgah’nagl fhtagn!
These words had been incanted by her - that I do not doubt one bit - but not in her orotund, fruity voice. It was the sound of those crickets shrieking inside my mind.

Then, right in front of me, the large cloak and hat fell to the ground in a heap. What I saw then, I will never forget. At first, I thought they were bees - swarming where the girl had just been. I wanted to believe they were bees.

But they were globules of floating light of every color known and unknown. They were bubbling among themselves - constantly in motion and very alive. I have no other means to describe it except as turbulent energy frothing forth from a slit in space.

Amidst that maddening sight, I saw Ape become Man. I saw Krishna in his divine form driving Arjuna to war, singing his Song. I saw Man kill Man. I saw tanks and rockets blow the earth to smithereens. I saw the Ocean turn scarlet and get vanquished by the insatiable Desert. I saw ancient temples of unknown deities sink to the deepest depths of space and age. I saw hideous, disembodied tongues relish rotting flesh. I saw sheep devouring humans, trees causing quakes, and stars distorting space.



I was sweating and shivering feverishly by the time I came to. The dais was vacant, the lights were on, and there was no one else in the hall.

Thursday, 28 May 2015

Yowl

Mumba whose eyes are a thousand blind windows! Mumba whose skyscrapers idle in the streets like apathetic giants! Mumba whose buildings are judgment! 
Mumba whose mind is pure machinery! Mumba whose blood is running money! Mumba whose clogged veins threaten to rupture!
Mumba whose love is endless oil and stone! Mumba whose soul is electricity and banks! Mumba whose factories dream and croak in the smog!
Mumba whose poverty is the specter of genius! Mumba the incomprehensible prison! Mumba whose fate is a wave of the waiting sea!

-- (with due credit to Allen Ginsberg)

Sunday, 11 January 2015

Feeding the Shoggoth

There is something about H.P. Lovecraft. He gets to your head. 



~*~
"The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown."
~*~

The plot of his stories is largely inconsequential, and his characters show little emotion aside from those of fear and disbelief. It's the after-taste that's delicious. That there are beings amongst us that are far beyond the comprehension of our senses, beings that have lived for aeons and traveled long through space and time, is a possibility that strikes the conscience in an ungodly manner and lingers in one of its many corners forever after.

The question is- what was he driven by?

Many people have attempted answering this question, and they seem to focus too much on his parents' mental condition. I believe there was a deeper reason behind all of it- he had lost his faith, but did not want to 'come out'.


~*~
"If religion were true, its followers would not try to bludgeon their young into an artificial conformity; but would merely insist on their unbending quest for truth, irrespective of artificial backgrounds or practical consequences."
~*~

He feared that if he publicly renounced his faith, he would be deemed one of those slow, primitive, racist stereotypes that he described so much in detail. 

He was torn between civilization and science.

He could not bring himself to believe in what his priests told, and he asked himself- "Why should I believe them? I myself have seen no proof."

And so he set out on a social experiment to see what he could get others to believe, and more importantly, fear. He thought of cults that had their own beliefs, their own gods- gods that were as probable to exist as the ones he'd been told about.

And out of this social experiment, came the Cthulhu Mythos.

~*~
"Bunch together a group of people deliberately chosen for strong religious feelings, and you have a practical guarantee of dark morbidities expressed in crime, perversion, and insanity."
~*~

The other religion that he thought of taking to should arguably have been morphine, as apparent through his writings. He feared that he would get addicted to it, and it would lead him to madness.

But, curious as he was, he fantasized about the apparent delirium brought on by opium, and others' perception of him in that situation, and wrote the extremely detailed emotions that he imagined everyone would experience.

Thus, The Mythos, though born out of a fear of madness, were inspired by his disbelief in religion and the desire to take to drugs to escape this life that he so disliked- in true Goth fashion. 

In fact, I would argue that Lovecraft's ideas brought on the Beatnik movement. Burroughs said this on coming across a real (fake) Necronomicon:

~*~
"The deepest levels of the unconscious mind where the Ancient Ones dwell must inevitably surface for all to see. This is the best assurance against such secrets being monopolized by vested interests for morbid and selfish ends." 
~*~

Thus, the Beats saw their inner demons reflected in these strange, indifferent gods, and the struggle to be out and open with them before they became weapons in the hands of others, came to be a central, fundamental principle of their philosophy.

H.P. Lovecraft was awesome.

Wednesday, 7 January 2015

Maya- A DSL for math and numerical work


I feel awkward writing mathematical functions as s-exps

(defn quadratic-1 [a b c]
  (let [d (* 4 a c),
        D (Math/sqrt (- (* b b) d)),
        t (* 2 a), -b (- b)]
    [(/ (+ -b D) t) 
     (/ (- -b D) t)]))


Clojure's thread-first macro eases the pain a bit..


(defn quadratic-2 [a b c]
  (let [d (* 4 a c),
        D (-> (* b b) (- d) Math/sqrt),
        t (* 2 a), -b (- b)]
    [(-> -b (+ D) (/ t)) 
     (-> -b (- D) (/ t))]))


..but it's still pretty loaded with parens, and not very clear.

We need a math DSL that looks infixy and uses fewer parens.
Luckily, we can hack one for ourselves in no time.

~*~

Step 1- Thread mathematical expressions

(defmacro math->
  "(math-> 1 + 5 * 2 / 3) ;=> (-> 1 (+ 5) (* 2) (/ 3)) ;=> 4" 
  [exp & f-x-pairs]
  (if (even? (count f-x-pairs))
    `(-> ~exp 
       ~@(for [[f x] (partition 2 f-x-pairs)]
           (list f x)))
    (throw (Exception. "f-x-pairs should be even."))))

Step 2- Allow temporary bindings

(defmacro maya
  "(maya 1 + 5 :as six, six * 2 :as twelve, twelve / 3 * 2) ;=> 8"
  [& exprs]
  (let [[exp [_ ?as & next-exprs :as E]] (split-with #(not= :as %) exprs)]
    (if (empty? E)
      (cons `math-> exp)
      `(let [~?as (math-> ~@exp)]
         (maya ~@next-exprs)))))

Step 3- Profit?

(defn quadratic [a b c]
  (maya 4 * a * c :as d,
        b * b - d -> Math/sqrt :as D,
        2 * a :as t, (- b) :as -b,
        -b + D / t :as x1,
        -b - D / t :as x2,
    [x1 x2]))


~*~

Edit: Here's the original gist.

Wednesday, 31 December 2014

CljOS - Objectifying Clojure

The venerable master Qc Na was walking with his student, Anton. 
Hoping to prompt the master into a discussion, Anton said 
"Master, I have heard that objects are a very good thing - is this true?" 
Qc Na looked pityingly at his student and replied, 
"Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, 
intent on studying closures. He carefully read the entire 
"Lambda: The Ultimate..." series of papers and its cousins, 
and implemented a small Scheme interpreter with a closure-based object system. 
He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying 
"Master, I have diligently studied the matter, and now understand that 
objects are truly a poor man's closures." 
Qc Na responded by hitting Anton with his stick, saying 
"When will you learn? Closures are a poor man's object."

At that moment, Anton became enlightened.

~ * ~
When I first started learning Clojure (and Lisp in general), I was extremely skeptical, and the primary source of skepticism was what I had been reading about functions. 

Functions in Lisp were described as beings of great power and flexibility, especially if they could "close over" their environment. Having been exposed only to what are called functions in C and static-methods in Java, I could not even begin to imagine how they could possibly be as powerful as objects.

The first step to realizing the awesomeness of Lisp functions was using higher-order functions. The whole concept of Java Interfaces that I had loved so much flew right out the window. This approach was simpler, more intuitive, and actually easier to write/read/modify. Just compare examples of sort-by to how you would do something similar in Java.

Now, I had written a game engine in Java (Kilvish), and was thinking of porting it to Clojure. I had originally intended to write idiomatic Clojure, but that would require a complete redesign of my Java code. This is when I had a scary idea.
~*~
"Lisp has jokingly been called "the most intelligent way to misuse a computer". I think that description is a great compliment because it transmits the full flavor of liberation: it has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts."

(Edsger Dijkstra, CACM, 15:10)
~*~
I realized that I could add an Object System to Clojure, and reuse the same structure as my Java code. And though this sounds like a big project in itself, I was able to achieve this in less than a hundred lines of idiomatic, documented code! The result was CljOS.

After this, it was business as usual, and I ended up with a small game engine that I call Bakait.

CljOS is NOT a re-implementation of the Java OOP system, by the way. Much like the rest of Clojure, it is closer to what Python provides. CljOS does not 'hide' any data, for example. Being written in Clojure, it is also thread-safe.

Another *BIG* difference from traditional OO is the inheriting of class-variables as well as methods.  This is not a problem because just entering a class name at the REPL shows the entire structure of the class- every property, method, and the entire class hierarchy that it is a part of.

Anyways, Rich Hickey (the creator and BDFL of Clojure) hates objects and has good reasons for it. I don't use CljOS myself when writing Clojure, and generally wouldn't recommend anyone else to use it. But its existence reminds me of the power I wield being a Lisp programmer. Although Rich has (good) opinions on how Clojure should be used, the language itself is extremely malleable.

In short- Clojure doesn't tell me how to write my code, I tell it how to execute it.