Diary · Page 3

September 15, 2024

██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████

Huge day for uExpress:

image.png

Implemented almost all app settings, refactored routing, fixed baseUrl and implemented body reading. I didn’t even really had to code body parsers, just made Request extend Readable stream and it worked with Express’s middlewares. Very nice feeling. Cookie parser also worked with no changes except for signing cookies.

Tags: #code

September 14, 2024

██████████████████████████████████████████████████████████████████████████████████████████████████████

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████

████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████


██████████████████████████████████████████████████████████████████████████████████████████████████████████████████ Implemented piping into res and res.sendFile.

At first I implemented sendFile using only streams, and speed was about 13k/sec. In comparison Express has 4k/sec. Then I’ve decided to split the mechanism into 2 parts:

  1. If file is less than 64 KB in size, just read it with readFile and send (since streams read file in 64 KB chunks anyway, useless overhead).
  2. If file is over 64 KB create a read stream and pipe into response, like before

This made it go to ~18k/sec. While playing around with readFileSync I realized that it’s much faster - 25k/sec, but I really didn’t work to play around with sync on main thread, so I’ve decided to experiment a bit with workers, and it worked out better than I expected! Speed is now 30k/sec, I finally found a good use for workers.

Basically finished implementing res.

image.png

Tags: #code

September 13, 2024

Spent the day implementing APIs. Finally no more routing… For now.

image.png

Getting quite green now. Hopefully it’ll be in actually usable state soon. While coding this, I’ve noticed that creating Buffer and then checking it’s underlying ArrayBuffer with Buffer.buffer showed completely different content and size.

image.png

It made me extremely confused, and I actually thought I found a Node.js vulnerability, but apparently it’s expected behavior. But it’s VERY weird. You can read and write into completely random Buffers you usually shouldn’t have any access to.

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████

Tags: #code

September 12, 2024

Quite a lot of progress on uExpress today. Added a lot of Request APIs, and then spent the night trying to optimize routing.

If path is simple (just a string), it’s possible to precalculate the path request would go through. This is what I did initially, and it raised speed from 20k/sec to 27k/sec at 1000 routes. But then I realized, I can then create actual uWS routes when route is simple and just use that precalculated path. And that significantly increased speed. It’s now 61.66k with 1000 routes and 90k/sec with 1 route. And 1000 routes + 1000 middlewares is now 26k/sec instead of 3k/sec. Great progress so far. Tomorrow I’ll have to also make it work with routers too, as right now it only optimizes paths for top application only.

image.png

Tags: #code

September 11, 2024

My throat has been hurting for past 3 days, and today I felt kinda unenergetic and weird, but not really sensibly sick. Not sure what’s going on here.

Went to buy tasty treats and other food today. Then spent rest of the day optimizing uExpress. I got curious, and created test with 1000 routes, and suddenly speed went down to 2k/sec, that was even slower than normal Express at 4k/sec! It made me actually scared that it was all useless and my bad code would destroy any gain from using uWS.

But after a round of different optimizations, it’s now 30k/sec at 1000 routes, while Express is at 4k. Back to huge speed improvement.

Played more Yume 2kki with friends. Found a nice place with very good music.

Tags: #yume2kki

September 10, 2024

Looks like I can only remember dreams if I go to sleep at about 2 am, since I actually sleep full 8 hours then. It was a bit nonsensical, too much random stuff going on to really make a good story, but at the end I was shown a very cozy bridge over the river by Aira. They then jumped from it and swam to the other side, while I had to go celebrate someone’s birthday for some reason.

Actually it seems that I slept for 9 hours today, so that’s why I’m feeling rested and had a dream. I’ve noticed a long time ago that no matter when I go to sleep, I always wake up at 11. It has been a long running curse for me, as it doesn’t allow me to rest properly all the time, since I often don’t go to sleep until 4-5 am.

As I’m writing this, I just realized the possible reason for why is this happening. About 4 years ago, my brother kept waking me up at about 10-11 am every single day no matter if I had to do anything or not. I kept telling him that I don’t need to do anything today but he never listened, we kept arguing every morning, sometimes we had mini fights, he would take my blanket, would keep coming in my room to make sure I didn’t fall back also again.

No wonder my brain keeps waking up on it’s own now, somehow always perfectly at 11. And I have no idea how to ever recover from this, it’s my dream to just be able to sleep through brightest and hottest part of day.

I looked up some messages and sure enough:

1000018179.jpg

1000018180.jpg

Man.


Continued coding uExpress today. More progress:

1000018188.png

Supporting multiple mountpaths took the longest time. Got to use a stack for the first time in my programmer life.

Tags: #dream

September 9, 2024

Continued coding uExpress today. Managed to implement Routers, which were really hard. Not gonna lie, I almost gave up but somehow did it (though idk if they really work properly in all cases…)

image.png

They’re pretty slow though. Nested router brings down speed to like 55k/sec. Normal request rate is about 85k/sec.

Finally played Yume 2kki again. Explored computer-y parts of it today, one of them was a maze (Data Stream) with a secret and cool music.

image.png

September 8, 2024

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████

Recently I’ve realized how line between sleeping and being awake is very blurry for me. I can be extremely energetic and then in 5 minutes already falling asleep.

Today I’ve started coding µExpress - hopefully a drop-in replacement for Express, with much better performance.

So far, it’s going unexpectedly well. I did a benchmark, and it’s 9X faster than normal Express.

1000018151.png

Express: 10k/sec µExpress: 92k/sec µWS: 106k/sec

Along the way making tests, and so far implemented following features:

image.png

Tags: #code

September 7, 2024

Apparently today there was a foodfest in the city, so I’ve decided to go and check it out. There was a big line for place where you buy tickets, so I decided to buy a ticket online. After doing it, I realized I need a paper thingy to pass, so I went in line anyway… But then after standing the entire time in line, apparently I could’ve just walked in as people with online tickets pass without immediately. Amazing.

There was quite a lot of different food there, it was quite hard to decide what to buy.

1000018100.jpg 1000018101.jpg 1000018111.jpg

I found bubble tea stand, and bought it to try for the first time ever:

Then I got this:

image.jpg

Everything was nice, but I didn’t like shrimp that much because I didn’t really know how to properly clean it.

I walked around some more and listened to the music. Bought corn and some meat.

image.jpg

Then bought and tried churros for the first time too:

image.jpg

And then decided to leave. I had mixed thoughts about going there, in general it was fine, but I was alone and I don’t like crowd and loud places thaaat much, so I didn’t really enjoy it. But I got to try some cool stuff for the first time, so it was definitely worth it.

image.jpg image.jpg

Added uploading videos and audios, gallery view for photos (that you can see in this entry).

Tags: #out #photos

September 6, 2024

So tired. ████████████████████████████████████████████████████████████████████████████████████████████████████████

Tried to find exact version of song from this video but couldn’t. So I recreated it as much as possible and created a longer version of this video:

September 5, 2024

Eventless day. Spent the first half sleeping until like 5, and another half switching Nekoweb and Atabook to the new server. █████████████████████████████████████████

Started rewatching Rick and Morty.

Played more Yume 2kki today. Our meowparty is growing, now there’s 6 members.

image.png

Meowparty HQ

image.png

We explored the Monkey Mansion. After exploring it, we found some nice rainy place, in which there’s a spot where you can hide from the rain.

image.png

Tags: #yume2kki

September 4, 2024

I don’t like when I have multiple things to do at once, but none of them are urgent. At first half of the day I just rotted in bed, because I couldn’t decide if I want to switch Nekoweb to new server or if to start doing the VPN. I was thinking of monitoring this server for a bit before switching Nekoweb, which is why I’m a little hesistant to do it right now.

Brother came over, so we talked and went outside to walk around. As we went through the park, we found scooter that you can rent, and my brother decided that it’d be fun to try it out for the first time ever. But for some reason scooter went really slowly, so we quickly abandoned it. As he stopped, app showed that we were apparently in «forbidden zone» and he got a fine for leaving scooter in it. It’s also why scooter was slow. That’s actually dumb as fuck. We didn’t even know we are in it, and when we stopped, we couldn’t go back to move it from there to remove the fine. No wonder everyone hates these apps.

We bought a slushie, and for the first time ever in my life I got what people call "brain freeze", which actually made me scared for a bit, but it went away quickly. For some reason my brother was not affected and never got it.

1000017999.jpg

█████████████████████████████████████████████████

1000018004.jpg

█████████████████████████████████████████████████████████████████████████████████████

█████████████████████████████████████████████████████████████████████████████████████

When we went back there was police and ambulance for drunk person.

1000018005.jpg

No idea what that was about.

1000018018.jpg

Added maintenance mode to Nekoweb. I think I’ll start the move to new server tomorrow.

image.png


Played more Yume 2kki. We went through a pretty difficult place to reach a beautiful scenery.

1000018025.png

By going to the left you reach Secret Society. A piano plays… It sounds a bit tragic — people in the building seem to all work on something, and it feels like the world is ending and they’re trying to save it.

1000018027.png

I really enjoy places that actually seem to have thought and story in them, and this one really feels like it. It reminded me of OneShot in a way…

1000018026.png

Between Secret Society and house place there’s this liminal room, which I really like.

Yume 2kki is full of worlds that just have a bunch random garbage sprayed around and you just have to walk though copypasted images until you’re lucky enough to find something (or more often just look up the map). I really dislike that. I haven’t been in that many worlds so far, but even now it’s easy to see what worlds had actually big effort and thought put into them and what weren’t.

Unfortunately vast majority are the bad kind.

September 3, 2024

Bad news. ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ Even more time to wait in fear, great.

Spent the whole day slowly migrating my services to the new server… This was very tiresome. Played some more Yume 2kki after doing it.

Tags: #yume2kki

September 2, 2024

Day started from me seeing that my website, services, Nekoweb and everything else was down. Apparently Contabo was having some issues in their datacenter, and I think this was the last stretch for me. While my VPS was usually fine and rarely had any issues, Nekoweb’s one constantly gets random freezes from time to time, and Nekoweb being down for 10 hours is just unacceptable.

I was meaning to do it for a long time, and this has finally made me get an actual dedicated server for Nekoweb. I browse Hetzner auction very often, but it seems to keep having same-ish servers with not very good specs, at the minimal range of price.

So I’ve decided to look for more expensive options, and found a pretty good server for it’s price. Quite modern CPU (2019), 6x2 TB of storage, 64 GB of RAM.

As I was ordering it, something unbelievable happened! Price of the server changed in my eyes, and now it had the minimal price. I was checking the auction (it’s Dutch style) quite often throughout the months, and I’ve never seen server this good to be sold at this price, so I hurried and ordered it. Now I have this server for same price as all other, much worse servers. I plan to move all my sites and services to it, not just Nekoweb, since it has more than enough specs for everything.

GWeX9_AWYAAep95.png

This is so beautiful, I’ve never seen htop so big…

I then installed Ubuntu on the server. And then realized I need to get RAID1, so installed it again with RAID1. And then realized I did it with wrong partitions, so installed it again…

image

RAID1 sync is taking a very long time, so I can’t really do anything with server while it’s going, since it’s just too slow.

In mean time, my brother visited me, and we talked about what’s going on in our life. █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████

Played more Yume 2kki with friends. Got all of the effects now, so I’m finally truly free to explore the world. At the end I have rested in my favorite place so far - Sewers.

image

It’s my element.

September 1, 2024: Apple Journey

Been thinking of infrastructure of the VPN. Maybe it’s better to just give Wireguard profiles + browser extension. Would make it much, much simpler to support basically all platforms. Drank strawberry Ramune, and it has a stronger flavor, which I like more.

Cooked ramen I bought yesterday, and it was really good! Spicy but not chemically-terribly-spicy like Buldak was. I really enjoyed it.

1000017917.jpg 1000017918.jpg 1000017921.jpg

After eating the ramen I played Yume 2kki again with friends. While playing we met a random person that just kinda joined us on our journey. It’s actually so cool to meet new people online in games, I haven’t done this in a very, very long time.

1000017923.png

1000017924.png

1000017925.png

Our journey went through the Fairy Tale Woods location. We got the Red Riding Hood effect, and found an apple altar.

1000017926.jpg

Pressing on it with the effect teleported you to a weird apple house, with girl sitting on top. The house itself was very tall, and hinted that you need another effect (Bat) to get to the top.

1000017927.png

Along the way to the Tribe Settlement to get Bat we visited the Sewers, which you can visit from the Dark Room by going upstairs.

1000017929.png

Cozy place. It’s clear that the structure you’re standing on is enormous, and if you go to the right you can find endless stairs down, which we didn’t explore further. I’m a huge fan of superstructures — the ones that make you feel small. The ones that you can visit, explore, and go outside to admire their size.

1000017928.png

Dark room had the Konami Room. You have to walk into directions based on the Konami Code, which then unlocks the way to Tribe Settlement.

To cross the river we needed 2 effects - Rainbow and Teru Teru Bozu, which we also had to get.

With Teru Teru Bozu you can summon rain and create the rainbow path, with which you can finally cross the river and get the Bat.

1000017930.png

After that we were finally ready to see what Apple house hides on the top…

1000017931.jpg

An apple. And a window for more adventures.

Tags: #yume2kki
1 2 [3] 4 5