SUB 500 BYTES WOOO
(I would have edited my previous comment, but HN closes comment editing after a while
220 karma · joined September 29, 2017
SUB 500 BYTES WOOO
(I would have edited my previous comment, but HN closes comment editing after a while
Sometime in the future, when brotli has replaced DEFLATE, lit could be further optimized. In general though, the differences would likely be minimal.
This was originally based off of Skeleton, with the intent being how small I could get the source. I looked online for CSS code golf, but I was unable to find any article, or even examples. The only thing I was able to find was CSS shorthand.
This is my code golf experiment. My goal is sub 500 bytes, anything lower probably will not be possible (then again, I said that about sub 700 bytes). My rules are pretty much full feature parity with Skeleton, and looking similar to the way lit looks right now.
The main way I was able to make lit this small was by optimizing for the gzip algorithm. I learned a ton by doing that, including some counter intuitive things when compressing files.
I would love for people to join me and help out, because I am running out of ideas to make the source smaller.
All joking aside, this is the first project I have ever submitted to a community forum. This is still very much a work in progress, but it is usable enough where I feel comfortable putting it out there. Right now, I am using it in google docs to write essays and stuff, but it will work for any text inputs in windows.
The main issue it has right now is consistency. Windows api is hard, especially since this is my first time doing anything as low level as this. Keeping track of the word that the cursor is right next to is a pain, and if there is a better way than the one I have implemented here, please tell me. I would love any feedback that helps me become a better programmer.