I have just de­ployed the new niravko.com web­site. This is the new mi­croblog for­mat that I’m ex­per­i­ment­ing with. I used to use Jekyll for my per­sonal blog, but I’ve come to gen­er­ally hate the ex­pe­ri­ence. Hopefully this new sys­tem of my own de­sign will work bet­ter.
The TMS website sucks so I made a captcha autofiller
In keep­ing with the spirit of the times, I’ve started play­ing in the Nepali Stock Exchange play­ground. It is a strange, dis­torted world for some­one like me who’s used to the de­ter­min­ism of the com­puter realm. And so far, it has just proved to be a more fash­ion­able way of los­ing money. But it’s ad­dic­tive! If you’ve ever had to use Nepal Stock Exchange’s Trade Management System (often called just TMS), you prob­a­bly hate it. It is at best an in­com­pe­tently made soft­ware with many glar­ing is­sues, hosted over a woe­fully un­der­pow­ered in­fra­struc­ture that can­not even han­dle the most pre­dictable of traf­fic spikes. On more than one oc­ca­sion I’ve over­sold or un­der­sold shares be­cause it’s UI was out of sync with it’s data­base.
Read full post ...
An Octopus and a Game Engine
I started mak­ing this thing as a one-day ex­per­i­ment: a fun lit­tle browser-game I could craft be­fore com­mit­ting to the ever­loom­ing nev­erend­ing self-judo one-man-death­wres­tle called ex­ams. But it in­stead ended up spread­ing out sparse as in­tense hour-long cod­ing ses­sions through­out the Quarantine months. This is how it turned out fi­nally:
Read full post ...
पर्खीर'न्छु
I keep on wait­ing for a re­lief; she’ll come bare­foot Like the wind she’ll blow out the can­dles I’ve lit and like the wind she’ll whisper in my ear I’m wait­ing for that whisper in my ear … Because I’ve picked up this strange habit of for­get­ting to ex­ist at times. True, I wake up in flesh and blood, and I walk through the air as it parts for me. Yet between my step out of one room and into the other, I find my­self dis­solv­ing into thin air: much like a whis­per that never finds its ear.
Read full post ...
Flappy Millennial: An HTML5 Canvas Game
Meet Flappy Millennial. He’s an av­er­age guy in his mid 20′s and the fu­ture looks bleak for him. With the threats of cli­mate change, mass-ex­tinc­tions, ris­ing au­thor­i­tar­i­an­ism, eco­nomic de­pres­sion, un­prece­dented wild­fires and so much more ever-loom­ing, ni­hilism has be­come his back­ground mu­sic. But worry not. For he has an an­ti­dote—well, not so much an an­ti­dote as a seda­tive. He has his phone! Come help this Flappy Millennial ig­nore re­al­ity while he scrolls through Instagram or some­thing. You should play this game not be­cause it’s good or any­thing, but sim­ply so you too can pre­tend that things are okay for a while.
Read full post ...
A Wandering Reverie
On rainy days I’m list­less and wrapped in a blan­ket I stare out into the eyes of the va­cant sky the pud­dles rip­ple and the wind she dances by, brushing my lips with a sub­tle kiss, a se­cret mis­chief, a cer­tain af­ter­taste On rainy days I’m mean­ing­less, I sip my tea, and count the days I con­tem­plate the rainy haze and when there is a sud­den chill, a wan­der­ing reverie knocks at my door she knocks twice-oh, she knocks once more
Read full post ...
Making मनसा: a Nepali Programming Language
I’ve been work­ing on and off on a Nepali pro­gram­ming lan­guage with my friends for the last few months. It’s called मनसा (IAST: mansā) and I think it’s ready for an al­pha re­lease. If you’d like to try the lan­guage out, visit mnsa.cc - the of­fi­cial web­site. You can play around with the lan­guage right in the browser with­out hav­ing to down­load any­thing, not even a De­vana­gari key­board lay­out. This post is a col­lec­tion of ran­dom things I want to say about
Read full post ...
An easier Nepali keyboard layout
As I wrote in my (excruciatingly long and bor­ing) ar­ti­cle on the Nepali lan­guage and Unicode, typing in Nepali does­n’t have to be a pain. You are ab­solutely free to make your own key­board lay­out to type in Nepali Unicode (which, by the way, has much bet­ter fonts than Preeti and Sagarmatha). In fact, a few months ago, I made my own key­board lay­out be­cause there’s no way I’m go­ing to
Read full post ...
Visualize C++ Data Structures using Graphviz and the DOT language
Data struc­tures help struc­ture and or­ga­nize data ef­fec­tively, and pro­vide sev­eral ab­stracted op­er­a­tions on the data. They are el­e­gant and con­ve­nient, and com­puter sci­en­tists love to use them. Implementing these data struc­tures in the com­puter re­quire the pro­gram­mer to flat­ten the struc­ture into a one-di­men­sional model us­ing point­ers or ref­er­ences be­cause the mem­ory is ac­tu­ally arranged as a one-di­men­sional run of data el­e­ments. It is of­ten nec­es­sary to in­spect the data s
Read full post ...
How to Daydream
In the class­room, the teacher drones on and on in his ma­roon col­ored t-shirt that does­n’t suit him. His empty vi­bra­tions rip­ple through out the room, bounc­ing off the glass win­dows shut tight against the sum­mer breeze, mix­ing with the click­ety-clack of the ceil­ing fan to cre­ate a sub­tle dis­so­nance, and stretch­ing in­def­i­nitely and in­ter­minably in time and in space.
Read full post ...
Anticipate Blue Light Filters When Designing For The Web
I just no­ticed that I can’t tell a link apart from nor­mal text on this blog when I have blue light fil­ter en­abled, es­pe­cially when it’s nes­tled in a large body of con­tin­u­ous text. There are a few rea­sons for this: I use a dark shade of blue as the ac­cent color of this blog, and I have cho­sen to re­move un­der­lines from links be­cause of ty­po­graph­i­cal rea­sons (al­though, there is [ev­i­dence](https://​adri­an­roselli.com/​2014/​03/​i-dont-care-what-google-
Read full post ...
On the Nepali Language and Unicode
The Nepali lan­guage gets very lit­tle rep­re­sen­ta­tion on the in­ter­net. Take, for ex­am­ple, the Nepali Wikipedia which has about 33 thou­sand ar­ti­cles. The Esperanto Wikipedia boasts 8 times that num­ber (at around two hun­dred thou­sand ar­ti­cles), which is kind of sad, be­cause Esperanto is an ar­ti­fi­cial lan­guage cre­ated by one per­son in the 19th cen­tury. It is spo­ken by a mea­ger 2 million peo­ple world­wide. Compare this to the Nepali lan­guage, which has more than 25 mil­lion
Read full post ...
Sandboxing Unsafe Executables in Linux for an Online Compiler with Minijail
I wrote a toy com­piler few months back. I wanted peo­ple to see it, so I put the code up on Github. But as it turns out, not every­one is will­ing or ca­pa­ble of go­ing through the con­vo­luted process of cloning the repos­i­tory, com­pil­ing the pro­gram, in­stalling a Nepali lan­guage key­board and learn­ing an ob­scure half-baked pro­gram­ming lan­guage just be­cause some id­iot put it on Github. So, I started to write a web app to make the pro­gram eas­ily ac­ces­si­ble. The web app lets user write code i
Read full post ...
I can't stop thinking about her
So lis­ten, It’s 12:30 am. I spent the last hour toss­ing and turn­ing in my bed, lis­ten­ing to the scur­ry­ing feet of the cock­roaches, try­ing to fall asleep. But sleep won’t come. There is­n’t a sin­gle thread of sleep in my body to lull me. I can’t stop think­ing about her. Any time I find my­self slip­ping off, the im­age of her smil­ing that daz­zling smile ap­pears out of nowhere and sets my heart rac­ing again. I re­mem­ber the line I’d read in a poem by Neru
Read full post ...
Lana Del dreams of Hetauda
The un­for­tu­nate truth is that she does­n’t care. Which is to say if at any in­stant the earth blew up, the sec­ond be­tween me reg­is­ter­ing the bang and col­lid­ing on a boul­der, I’d be think­ing of her. But she would­n’t. Which is to say that I have kept her in that part of my heart where flow­ers bloom and but­ter­flies flut­ter all col­or­ful and cheery. But she has kept me in that for­got­ten cor­ner where she keeps her small pen­cils and rusty sharp­en­ers, in­side a ne­glected p
Read full post ...
Animating WALL-E on a LED dot-matrix display with AVR
I was asked to an­i­mate a dot-ma­trix dis­play for the ro­bot­ics club re­cently. They wanted some­thing that said “Robotics Club” to hang over their door. We had some old P10(1r) DMDs which I had worked on in the past to make a lit­tle score­board for a ro­bot foot­ball match. And, even though I am not very good at it, I re­ally love an­i­mat­ing things. So I de­cided to give it a shot. I ended up writ­ing an an­i­ma­tion soft­ware for the DMD in JavaScript which is un­for­tu­nately only as func­tion
Read full post ...
Animating a Skeleton in Pixel Art
I an­i­mated this a while back. I re­mem­ber it took me days. First I had to learn how to ac­tu­ally draw the hu­man skele­ton (_The Atlas of Human Anatomy for the Artist_ by Stephen Peck is an amaz­ing re­source). Then I had to dis­till the ideas into the bare min­i­mum re­quired to get the pic­ture across. Finally I drew and an­i­mated the whole thing in piskel. The an­i­ma­tion process was quite te­dious, at least in part be­cause this was my first try.
Read full post ...
A Downpour, then a Rainbow
It was a strange af­ter­noon, no doubt. The sun grinned from the west, mak­ing shad­ows in strange cor­ners and bounc­ing off white­washed walls, while the east­ern sky was dark and pre­mon­i­tory with a sin­is­ter tur­bu­lence. I was walk­ing home con­tem­plat­ing this con­trast and hop­ing for a rain­bow. First an ap­pre­hen­sive drop hit my ear­lobe. I con­tin­ued to walk. The next landed on my cheek. The women com­ing out of the shop held out their palm and light­heart­edly ex­claimed, “Hurry! It’s start­ing to rain!”. I con­tin­ued to walk. I felt a drop on my eye­brow, then on my nose, then two drops at once and be­fore I could reg­is­ter that I had lost count, it had started to rain.
Read full post ...
Implementing the Huffman Compression Algorithm in C++
The fi­nal code is in GitHub _here_. Da Vinci is quoted say­ing, “Art is never fin­ished, only aban­doned”. I don’t see why it should be any dif­fer­ent for code. With that said, I’d like to de­clare my lat­est pro­ject: an im­ple­men­ta­tion of the huff­man’s al­go­rithm aban­doned. It works well as it is, but it can be made a lot bet­ter.
Read full post ...
A Drizzle in Pokhara
If you think be­ing madly in love with your best friend’s girl­friend is un­for­tu­nate, try sit­ting next to him dur­ing a Microprocessor lec­ture hav­ing to lis­ten to him de­scribe the sex they had the day be­fore. What’s more, Mi­cro­proces­sor is one of the few sub­jects I ac­tu­ally en­joy. My friend is nor­mally a level-headed per­son who does­n’t speak much. But it seems that the ex­cite­ment of the first time is grand enough for him to break char­ac­ter. Need­less to say, I’m mis­er­able.
Read full post ...
Maybe those really were the good old days
This line popped in my head yes­ter­day with no con­text what­so­ever. Then I spent the next many hours try­ing to re­mem­ber where I’d read it. The an­swer came just as sud­denly. This line is from the book “Hear the Wind Sing” by Haruki Murakami. I love how it evokes a sense of deep long­ing for the past. In many ways, I think this line is the essence of the en­tire novel. Time erodes away the hum­drum re­al­ity from mem­o­ries and leaves you with frag­ments of faded im­ages. No
Read full post ...
Love blossoms in Winter
I’ll con­tinue to be lost in my in­ces­sant thoughts of you. In rain­bow dreams. In lively con­ver­sa­tions. In the loneli­est of win­ter af­ter­noons, when the sun is bright and the breeze cool, and the only flower that blooms is you, on your first floor bal­cony eat­ing tan­ger­ines.
Read full post ...
On playing audio using Atmega microcontrollers
I re­cently made a cir­cuit to demon­strate au­dio gen­er­a­tion us­ing an at­mega32a mi­cro­con­troller. And even though mostly knew the con­cepts in­volved, I ended up learn­ing a lot. For one, I learnt that ma­trix boards are very an­noy­ing when deal­ing with mi­cro­con­troller pins. I ended up re­ally mess­ing up the cir­cuit’s back­side be­cause I had­n’t planned be­fore­hand (Did I men­tion that this is my first time us­ing a ma­trix board?). Next, I learnt that CR2032 bat­ter­ies don’t
Read full post ...
Looking at MERN stack
Long ago, when I was a lit­tle kid, I found about the WAMP stack. It ab­solutely thrilled me to think that I could own a piece of web and make it do what­ever I wanted. I was also a fan of 000webhost back then (then it got hacked). So in a frenzy of rapid cod­ing and loads of cussing (I was a be­gin­ner in both) I built sev­eral web apps. Things like half baked so­cial net­work­ing sites, blog­ging web­sites and such­like. One such in­ven­tion I re­mem­ber with par­tic­u­lar fond­ness is a s
Read full post ...