0x0b — nothing but passion
As many have observed before, it sometimes takes me months to hammer out specific issues or bugs on projects.
Anyone who knows me knows that I don't program for any monetary reasons. I mean, yes, I do have a sponsor button on GitHub,
but I'm completely open to saying that I proudly have 0 sponsors. So realistically, this is all just a hobby for me.
That being said, when I work on programs, I do so out of purely passion. I don't work on things I don't like or don't want to,
and more over, if I have to force myself to work on something, I dread it even more.
I've said it before, but for as much as I love programming, I fucking hate it. This stems from me working as a developer in the past,
I lost my love for it for a long time, got really burnt out on it.
A very long period of time later, I started getting back into programming.
From time to time though, you may notice that I am very slow to fix issues.
In particular, something like #20 on tiramisu.
Opened October of 2020, closed (for good) July of 2021.
The sad reality of it is that I hate tiramisu now, though. I hate working on it, I hate its implementation as I think it could be better, I hate that it has the attention it does,
I just hate the whole project.
So of course it took three-fourths of an eternity for me to work on it. I have to force myself to work on it.
Not to mention that it's a pain in the ass for me to work on it, since I don't have any actual machine running linux, and WSL and dbus don't exactly agree.
So realistically, it's a pain in the dick hole to even begin work on, and then it's a more metaphorical pain in the ass crevice because I don't even want to work on it.
Other projects, like hummingbird and Moonstone, however, I still have a burning passion for.
I will say, just because there's been no recent git history on one of my projects doesn't mean I'm sick of working on it and just quitting on it. It could just mean it's actually done. Or, equally likely, I just havent pushed
my local commits any time recently.
Whatever the case may be though, just know, all of my projects and products of passion.
0x0a — a secret scam
Every so often in society, people, businesses, companies even, get caught scamming people.
There's some things in life that are just completely unreasonable to pay for.
Maintenance on your car (I'm a firm beliver that everyone should do their own car work, but I'm also a car guy so my opinion is worthless),
scalped computer hardware, the cost of Pokemon games for the GameBoys and Nintendo DS', but worst of all, beef fucking jerky.
Hear me out. Everywhere from San Diego, CA and Dallas, TX, Jack Links Beef Jerky is a fat $5 for ~3oz. They're not the only offenders, though.
Other brands are worse. More money for less meat.
Now the more astute among you may pin the blame for the high price on smoking the beef (or meat in general, in the case of non-beef jerky),
on the spices, quality assurance, but none of that matters.
It's all bullshit because to make beef jerky, all you do is just spice and smoke.
When you can get much higher quality beef for just $10 per pound, that's 16oz of good meat.
This means that you pay just a bit over 3x for jack links that you would just buying meat yourself.
Wake up, sheeple. Big beef doesn't want you to know this.
Jerk your own beef.
0x09 — keyboards
Recently I've been wanting to get into making a custom keyboard. I love building things, and one of the things I've never gotten into before is clickity click clack machines
But I'm having a hard time justifying it.
Now whenever I get into something, I get into it. I research for several hours different parts, components, the benefits of some versus others,
no choice I ever make is without hours of learning. Which I quite like.
For some peculiar reason though, in the days, if not weeks now, of my looking into different PCBs, different layouts, switches, and keycaps,
I haven't been able to justify making one.
At the end of the day, a keyboard is just a means of input for my computer. More specifically for my desktop, since I use my laptop as an actual laptop.
Alright, so what's the hold up? Well, keyboard builds come out to over $200 typically. I've got a keyboard that I paid $40 for.
They both accomplish the same thing, but one for a drastically different price.
"One has a much better typing experience!" You say, and to that I say that I don't actually feel the difference... at all.
The nerves to my fingers may not be firing correctly or something, because despite what many scream, I feel no difference at all.
I mean, sure, the individual key caps may be different, but the actuation feels no different to me. Which is ideally what I want to feel different.
"But the sound! The custom one will sound so much better!" You begin to cry out.
I don't hear a difference. The only time I hear any difference at all is when someone drowns the stabilizers in lubricant.
Alright, well maybe the layout is what I would benefit from.
Nope, not one fucking bit. I use all of the keys on my keyboard. All of them.
I use the numpad regularly, I use my home/end and page up/down keys when programming, which I do regularly,
I use my function keys as media controls... I use every key no the keyboard. Even system request. Try me.
Anyways, I see no value in building a custom keyboard. I wish I did.
I really want to build one. But I can't justify to myself spending the amount of money one costs to build,
when I have a perfectly good one.
On the other hand, there are more things I really want to get into with keyboards.
In particular, I'm very interested in stenography.
If you aren't aware of what stenography is, neither was I. In essence, stenography is the use of a special keyboard
that has keys for phonetic sounds. So instead of pressing individual letters to write out a word,
you press the beginning phonetic sound, the ending sound, and the keyboard fills in the spaces in between.
That explanation was a little simplified, in actuality it's a little more complex than just that,
but it's a really interesting means of typing. The actual purpose of stenography is for stenographers,
someone who transcribes speech, typically in the court of law.
Maybe one day I'll build a keyboard. And maybe it'll be a steno keyboard.
0x08 — misunderstood
For whatever reason, macOS is very badly misunderstood in the context of *nix users.
I'm not quite sure why that is, honestly. In the same sense that linux is *nix, macOS is very much also *nix.
I've got the 2021 MacBook Pro, which has the new M1. I really wanted to play around with the new CPU,
but also branch out a bit more. I've developed for macOS before, not to say that I had amazing projects for it,
but I'm not new to it. What I am new to though is owning a real mac. Previously I just would use a Hackintosh install
when I had a Ryzen 3 2200G and an RX550.
Lovely hardware combination for macOS, I'd say.
Anyways, the M1 is actually extremely powerful I've found. Many others have found this news before me,
but to my surprise, it almost competes with my 3950x in single core performance.
I'm not quite sure whether that's the raw horsepower of the CPU at work, or if it's the amazing optimization Apple
is known for, or if it's the ARM architecture grinding. Regardless, at its core, it's still running macOS.
Which very indirectly is based on UNIX.
So why in a community of UNIX-like systems does it receive so much hate?
I think it's just misunderstood. Very badly at that.
For what it's worth, macOS has amazing system level APIs.
Like, incredibly good. Security is not an afterthought on macOS, and it shows. I'm not going to pretend
there haven't been any vulnerabilities before, but unlike a lot of Linux distributions, everything is built with
intent. Something that Linux suffers a lot from.
In macOS, the developers convenience is not at the expense of the end-users usability, nor security.
The root file system, for example, is not mounted as r/w, it's ro. If it ever is mounted as such, it's with intent.
Something many Linux distribution should take notes on.
On top of this, it's just as customizable as Linux distributions are. You can change out as much or as little as you want.
The options are limited, but that's because the same crowd of neckbeards writing window managers and compositors
for Linux are not the same crowd using macOS. There's very little overlap.
Another thing is that much of the system is event driven. I know the programmers out there are starting to lose their minds.
If you've ever had to program something that requires you to test conditionals, but you don't have any direct API,
you probably had to use an infinite loop. Which kills CPU usage. Maybe you could poll, but what if there's no file descriptors?
Realistically, I can see money as an argument against macs. But like previously brought up, you can do Hackintoshes.
If you intend on doing one, you'll find you're restricted in the exact hardware necessary because drivers don't exist for everything.
If you can do it though, it's definitely a fun project to take up, and not a bad daily driver.
If you don't like it, you don't like it. People will find every reason in the world to dislike something, except for
their own personal tastes. For whatever reason, they just can't say "there's nothing wrong with it, I just don't like it."
To summarize, I see no reason why macOS receives the hate it does. It's just badly misunderstood.
0x07 — systemdo or systemdon't
Often times in the *nix community, people will tell you things like "systemd is bad" and that you shouldn't use it.
Then they will go on a triad of reasons why systemd is bad.
Now, to any normal or informed user, some of these arguments against systemd may be considered valid.
But to any other user, in particular users new to *nix, these are horribly misleading reasons to use something other than systemd.
The latter crowd is who this blog entry is for.
Systemd calls itself a "software suite." So, as such, it provides many tools--few of which are actually simple--that are useful in the runtime of the operating system.
None of systemd's components are inherently bad.
The problem with systemd is that the entirety of the software suite is executed as pid 1.
The first process is the one that on many systems is the init system. It is the highest parent process in the hierarchy, as it is executed by the kernel.
Now in some applications, this is what you may want. You may want a reliable and battle tested process running as the init, especially on servers.
You may even want it on a desktop as well, for ease of use.
The biggest problem with being told what init to use and what not to use is that what works for others may not work for you.
A lot of people have asked me what init they should use. The simplest answer, use the one that works. If systemd works for your system, why replace it?
On top of that, some distributions of Linux almost hard depend on systemd. For example, Arch Linux, where the entire
system is built on the premise of using systemd. Packages that are installed have appropiate unit files for systemd. Replacing it, while it can be done,
is a tidious and quite annoying process.
So all of this is to say: if you're the user who is new to *nix, and you don't know what init to use, don't change your init at all.
To quote a friend of mine, "Linux users are all about freedom of choice, right up until someone's choice differs from theirs."
And on the opposite side of the spectrum, if you're the redbilled based user who is preaching to the newer, pure linux users:
Shut the fuck up. Let them learn the pros or cons of the software themselves. After all, for as much as I dislike systemd myself, it just works.
0x06 — a love letter to forums
Time goes on, technology is innovated upon, but when I was younger, I was enthralled by forums.
I don't know the particulars of it, but there's something oddly satisfying about creating a post on a board, and having to sit and refresh the page several times until you get a response.
That's something that nowadays technology has taken from us.
Why would people want to sit on a forum, create a post asking how to fix a problem or spark some sort of conversation when they can go on Discord and get a response damn near instantly?
Call it what you want, patience, delayed gratification--whatever the case may be, forums have a certain charm to them.
And while I appreciate a good quick response from time to time, or a quick catch-up conversation with old friends over instant messaging,
I have a much larger appreciation for simple forums.
In the forum community, it's hard to draw people in. It's hard to entice people to join in on something so primitive and outdated.
Maybe I just live in the past, but even today I still slay bits and bytes on good old bulletin boards.
Hell, if you look hard enough, you might even find forums that I'm still an active keyboard warrior on.
0x05 — a fictional story about timestamp gore
A long time ago, in a server far far away existed a web developer and a really interesting codebase. You are our savior in this story.
When you typically think of timestamps, chances are you think of a UNIX timestamp.
A 32-bit integer counting the amount of seconds that have passed since January 1st, 1970.
Storing timestamps seems like a relatively painless endeavor, just allocate enough space for the timestamp, and you're off to the race(condition)s.
Except maybe it isn't the best implementation. I mean, some time in early 2038 UNIX timestamps will overflow, and we'll need to either switch to 64 bit or create a new epoch.
It'll basically be Y2K all over again. 0x7fffffff16 will be our demise! Or will it?
Realistically speaking, likely not. What is more likely is developers will start implementing fixes for this overflow before it actually happens, and we won't be ill prepared.
But what about another solution? What if we stored timestamps as a string?
Well, this can be an implementation, and depending on how scalable you want your timestamps to be, maybe the best way to deal with this kind of issue.
So, as a little bit of a thought experiment, if we did this, how much space would we need to allocate for our string?
To calculate something like this, we'll need to make some assumptions. Typically, information on a website is stored in a database, and often times it's in SQL.
In a UTF8 encoded db, a single character is given 4 bytes of memory. If we use type varchar(32) to store a timestamp as a string, we'll have 128 bytes to work with.
128 bytes doesn't necessarily sound like a lot, but that's only for a single row. A single record.
If we say... store user data, to include when a user registered... Well, now we have N * 128 bytes of storage being taken up, where N is the amount of users, assuming we store no other information of course.
You see where I'm going with this, right? So just 8 users deep, and all of the sudden we're taken up a kilobyte of storage for just timestamps.
By the way, do you like gore? I sure hope so.
Imagine for a moment that instead of storing a timestamp as a string in only a single column, we split up each part into its own dedicated column.
Let's be conservative and say that we give each indice... 6 characters to work with at most. And we'll say we only need the seconds, minutes, hours, days, months, and years.
Alright, we've got 6 columns, each of them have 6 characters. Remember, one single character takes up 4 bytes. 4 * 6 * 6. Now our timestamps take up 144 bytes.
So given our algorithm of N * 144, we hit 1kb at just 7 users. Not that much of a difference, but we sure won't fucking scale well at all.
Now we're taking a metric ass-ton (abbreviated as AT) of space for only timestamps. We haven't even stored more than one, and we didn't calculate storage space for any other columns.
So by the time we add everything else back in, our user table is now taking up more than an AT. We're now taking kilo-ass-tons of storage space. kAT.
So we're taking severak kATs of space, and we haven't even considered actual usage with this.
Time to query the database.
SELECT `seconds`,`minutes`,`hours`,`days`,`months`,`years`,`uid`,`username`,... FROM `pain_and_suffering.users` WHERE 1;
Could you imagine having to write that query several times over?
Don't worry, you don't have to, because in our fictional story, Bill did it for you.
Bill got fired by the way. Google didn't like how badly their database was running. And it's your lucky day, because site-wide, you get to fix this.
Oh, no, Google isn't running a query generator or anything. They haven't moved onto more modern technologies yet because they don't know how secure something like Laravel is or isn't.
This might be a good time to mention that if we just used the datetime column type--which only uses 8 bytes--we would only be at N * 8. We'd hit 125 user records before we hit a kilobyte.
Just some food for thought; we haven't even hit a single AT of taken up storage space yet by using the datetime type.
You've been tasked now with fixing every database query, as well as every bit of source code that deals with Bill's original database schema.
So what do you do? You start a transaction.
Time to write up a bit of code that iterates over every record in the database, parses each column related to time, concatenates it all, converts it to a proper UNIX timestamp,
stores it properly, then stores it in the database. Then you make sure everything is good, commit to the database, or rollback if not.
Don't get me wrong; I'm not saying that storing a timestamp as a string is necessarily a bad thing, but don't be like Bill and assume it's going to be the best approach.
Thankfully this story is only fictional. I pity the person who once had to, or one day will have to, fix this completely fictional issue.
Remember, kids, sometimes the best approach is the one most used. We don't all need to be innovators.
0x04 — close the window, i'm programming
You know, being in quite a few *nix customization communities, and also developing programs primarily for Linux, people often ask me, "Why the fuck do you use Windows?"
Don't worry, the irony is not lost on me. I may be smoov brane, but I'm not senile. Not yet at least.
Now there's a lot of reasons I use it. The most common one I give is that I think linux is a waste of good hardware.
Take that how you will, but I've used linux for a very long time. That being the case though, as far back as I can remember using it, it was only ever prominently on old laptops or machines with weaker hardware.
Any average linux user will tell you it's because "linux gives your computer a performance boost!", which itself is wrong. Linux just doesn't use as many resources as another operating system, like Windows.
You have no actual performance gain as you otherwise would, it's just it seems like that to the end user because of these freed resources.
The next reason is simply I don't like babysitting my system anymore. I think it may because I'm getting older as the days go on, but I don't like doing package management anymore,
I don't like having to go on a witch hunt for a bug and I can't use my shell anymore because I did a partial system upgrade, and now I have to burn it at the stake because bash depends on readline, and bash can't use the version of readline on my system.
It's mostly beyond me now, I've done it before, I'm tired of doing it, so I don't want to do it again.
Next, I grew out of my customization phase. Don't get me wrong, I love doing desktop customization, and I do dabble in it every full blue moon, but that's only in passing now.
I no longer just sit down for hours on in trying to find the "optimal" setup. It's kind of like building a computer or working on a project car. You may get done with it, but it's never complete.
Now if any of these reasons apply to you, that's completely fine. There's nothing wrong with having old hardware, nothing wrong with babysitting a system,
and there's nothing wrong with wanting to customize your system unless you use i3. These are just my reasons.
This still begs the question though, "Sweets... you use Windows, yet you develop for Linux? What are you smoking, and where can I get some?"
To answer your second question, I'm not smoking no matter how hard that may be to believe, and then to answer your first, yes.
Alright, good talk. See you later.
In all seriouesness, I still love Linux, despite not using it myself. I especially love developing for it because, simply, it's fun for me. There's no rhyme or reason.
I just enjoy it. And hopefully you or others enjoy using what I make. Even if you don't, at the end of the day, I program for fun (and thank fuck I don't program for a living now, I can tell some horror stories about that).
So yeah, next time someone calls me a retard in a certain "down" Discord server, I'll just refer them here.
And if you're that person; go fuck yourself, there's nothing wrong with using Windows, despite what the insects living in your neckbeard tell you.
Also take a shower.
0x03 — help, i'm lost in walmart
After some bouncing of domains off of the forehead of a certain box, I've finally decided on what I want to call my blog.
A common tagline I've used on various social medias is "Help, I'm lost in Walmart."
This mostly stems from my inability to think up bios and such, but it's stuck for quite some time.
So what better to call my blog than the lost in walmart blog? My blog isn't strictly tech related, just a blog for me to write whatever comes to mind.
So officially; help, I'm lost in Walmart.
On another note, you may notice in the top right a "previous" and "next" button.
The lost in walmart blog is part of a webcircle, the links go to various sites of my friends, and at some point, back here eventually.
Check out the other sites in the circle, I'm sure something that piques your interest can be found.
0x02 — __always_inline, linux, and musl
If you're trying to install kiss linux (or any non-glibc distribution) with a linux 5.x kernel, you may find that you'll run into an error trying to build the kernel.
/usr/include/linux/byteorder/little_endian.h:44:8: error: unknown type name '__always_inline'
On a system running glibc, this isn't particularly an issue; __always_inline is defined.
This isn't the case on systems that are using musl or other libc's though.
So, as a quick fix, open up /usr/include/linux/swab.h in your flavor of text editor, and include linux/stddef.h just below linux/types.h.
With that, try to build again and you should be up an running.
Several PRs have been made in regards to this issue, so hopefully this will be fixed soon.
0x01 — pure of heart, dumb of ass
So this is my "blog" of sorts. A little about me, about the work I do, my system, etc.
I'm Grayson, I go by Sweets on the internet. I'm 20 years old, born in Texas, I now live in California.
My background is in full stack web development, though I don't work as a developer anymore, now I'm just a lowly C hobbyist.
Now I work as a microminiature repair technician. I solder super tiny circuits and shit.
I believe in clean, readable code. I'm known for a various projects in *nix communities, tiramisu, hummingbird, and custard just to name a few.
Some information on my systems, my desktop is a custom build that I've named "mercury".
I've got a Ryzen 9 3950x @ 4.5GHz, an RTX 2070 Super, Sabrent Rocket Q4 4TB, an Asus Strix B550-I, all housed within the beautiful formd T1.
My primary operating system is Windows 10, which is where I do all of my development. And yes, I see the irony in that.
My laptop is a 2021 MacBook Pro 13". The fancy M1 one because I have a bad habit of spending copious amounts of money on unnecessary hardware.
When I do use Linux, I use kiss linux and debian.
Some communities that I frequent are r/unixporn and r/sffpc.