As of late I've spent some time making improvements to my tiny C string library called SubStrings. There are other string solutions, but those either involve a language such as C++, or they try and create a new string type with a struct or something. In many of my programs, there is a huge amount of text processing. One might say more than you should generally attempt in C. It's not a big problem for me actually. It's becoming even less of a problem since I made my pet projects use SubStrings. As I said, I've recently updated it, but I've added a ton of new functions and features. I've updated aqu4bot to make use of these improvements where available.
Take this example of trying to iterate through lines of text stored in a string in memory
This was extracted from aqu4bot BEFORE I updated to use the new SubStrings functions.
It iterates through each line and forwards them to an IRC user.
Worker = InBuf;
do
{
while (*Worker == '\r' || *Worker == '\n') ++Worker;if (*Worker == '\0') break;
for (TInc = 0; Worker[TInc] != '\n' && Worker[TInc] != '\r' && Worker[TInc] != '\0' && TInc < sizeof LineBuf - 1; ++TInc)
{
LineBuf[TInc] = Worker[TInc];
}
LineBuf[TInc] = '\0';IRC_Message(SendTo, LineBuf);
} while ((Worker = strpbrk(Worker, "\r\n")));
Hideous, yes?
Thanks to SubStrings, I can shorten it to this:
Worker = InBuf;
while (SubStrings.Line.GetLine(LineBuf, sizeof LineBuf, (const char**)&Worker))
{
IRC_Message(SendTo, LineBuf);
}
I'll be sifting through aqu4bot's code and updating other components that rely on deranged gerbil magic to get strings to work properly. I'll also be working on SubStrings more.
So far, SubStrings is:
* C89/ANSI with no extensions/platform specific stuff
* Doesn't use ANY library functions, meaning you could build it into your bootloader to make text processing easier.
* Uses a pseudo-OOP function pointer based system for getting functions.
* Is small enough to painlessly be embedded in larger source trees.
* Is public domain (unlicense) software, making it pretty much license neutral.
This should encourage me to add new features to aqu4bot, including making good on my threat of using libcurl to build in email support. Why? Because fuck you.
Begun, this grand experiment is. We have had some whose feefees were hurt by moderation, which is strange, since moderation should be by definition moderate, or at least moderating. But maybe we have the opposite effect occurring. Not to say that the extreme views are prevailing, but the noise to signal ratio seems to be increasing. I must confess, bear with me here, that I actually used the "disagree" mod, to disagree with someone objecting to the "disagree" mod. Perverse, yes. Uncalled for? I think not! Mod me the same if you disagree!
But all this belies the dysfunctional state of debate (or the more polite term, discourse) in America. Yes, I specify America, as in the United States of, because of the rank corruption of political discourse by the one percent, combined with a uniquely American anti-intellectualism that discounts scholarship, research, learning, schools, teachers, and basically anything that requires some effort to understand. Americans are lazy. Unfortunately, they have added scared to the repertoire. But I assume that Soylent News includes more than cowardly Americans who have to run of to former Russian Colonies.
So, topic of the day: Faith. Do you believe that free and unfettered argument will get us all closer to the actual truth? Or do you reject the same because of the possibility that your position will lose the debate?
So I released the first update release for 1.2 series. It's a very small update, it fixes a bug that pissed me off and it adds support for something I wanted to get into 1.2.0.
The bug: There was a problem caused by dunce syndrome where the time for shutdown commands had extra or too few zeroes, caused by a tired coding problem.
The feature: Now the 'epoch status', 'epoch start', 'epoch restart', 'epoch stop', and 'epoch reload' commands can have multiple service names specified at once. That means instead of 'epoch restart aqu4bot;epoch restart aqu4bot_soy', now I can just do 'epoch restart aqu4bot aqu4bot_soy'. Saves a bit of typing if you have a big list of services you want to apply the same action to. The method I used to implement this for 'epoch status' is hideous and is ironic considering the goals of 1.2 Peroxide, but it works and it's not buggy or anything.
Those are literally the only changes in this release.
The 1.x.1 releases tend to be little bitty bugfixes and stuff.
So, I've pushed out the final version of the Epoch Init System 1.2.0 "Peroxide". It's mostly a bugfix release and cleans up most of the nasty code in Epoch. Here's the tarball: http://universe2.us/epoch_1.2.0.tar.gz
I probably could have done more to it, but I wanted to just finish and get the release out so I could roll an update for my personal distro with the new version of Epoch in it. Nonetheless, this release should be pretty stable and is a recommended update. It is safe to update 1.0 and 1.1 releases to 1.2.0 without rebooting. Replace the 'epoch' binary with the new version and then run 'epoch reexec'. Check /var/log/system.log and it should tell you that you've been updated to 1.2.0. NOTE: if you do NOT run 'epoch reexec' after replacing the binary, your root filesystem will not be able to be remounted read-only on system shutdown and that could lead to data loss.
There is no good reason I can think of that you would not want to run 'epoch reexec'.
Here is a list of changes:
Changes since 1.1.1:
* Cleaned up a huge amount of code that was just fugly as hell. This is the big change.
* Removed unsigned long abuse caused by my (at the time) severe OCD.
* New service status output format. Looks cleaner.
* Extremely deprecated AlignStatusReports attribute completely removed. I doubt even one person will be affected by this.
* Add three new attributes: StartingStatusFormat, FinishedStatusFormat, and
StatusNames to manually specify an alternate service status output format.
* Specific bugfixes:
* Don't set a config problem check to WARNING after we already found a FAILURE.
* Fix overwriting service messages, caused by our old status format.
* Fix inaccurate reporting of scheduled shutdown times, now report seconds too.
Warning: if you suffer from depression, don't read this. It might mess with your head. Not kidding.
This is probably the first time I've written to you, universe. I may have prayed to God or others, but I doubt I've spoken to you before.
I need to drop on my knees, and sob out my thanks to god for Prozac 60mg. I've suffered more than I imagine near anyone else can comprehend. It's such a sick, bent agony laced with petrifying fear, covered in 'my-universe-is-broken' sauce. The OCD I was dealt in 2011 is the most indescribable hell I can imagine. I can laugh at the atrocities I see on the news because I would have traded places for something as simple and benign as physical pain, the pain of four broken limbs or having my skin peeled off with a steak knife. Instead I was given 24-hour terror equivalent to being eaten alive by a monster. I wanted to die so bad during this. I wanted to die so badly.
I was alive for my family but even their need was getting to not be enough to justify my living in this carnival from hell.
So as you know I ended up in a crisis center in September, right in time for 9/11, and was put on several medications, none of which worked, and one (Invega, the only antipsychotic they tried), actually made it far worse. Then they gave me the Prozac. I knew that SSRIs needed to be a high dose to help OCD, so I bothered them until they raised it to 60mg.
It took the month and a half to start working they said it would. A little longer.
We both know I was not given the hand-washing or germ phobias with my OCD, I was given the horrible obsessive existential stuff, the really horrible painful questions that I'd obsess over until every fiber of my being believed them to be true. The kind of stuff that can blacken your sky and make you feel like you're falling into an infinite pit of pitch black tar. The stuff that makes you want to die, but be too afraid of what nightmare would await you if you did. The one the sufferers called Pure-O. I suppose I deserve some positive reward for living through this at all, or perhaps just an absence of punishment for a while, since if I wasn't wanted by family and friends, I'd be two years dead by now.
I'm writing this because I want to tell you what I need now. I hope you'll give it to me. As you know, the last few months, during my recovery, I've stopped all work, all projects, all programming and just played Warzone 2100 all day. I've gotten as good as I was before. I'm happy for the first time in years. I plan to start my work again soon, but I need some guarantees from you before I do so.
The first thing is, as an example, my famous gerbil jokes, such as 'fear the gerbils', no longer appeal to me, because I've had enough fear. Horror movies are no longer something I watch, I don't enjoy Halloween anymore, and although you know that historically I've preferred sad music when sad, now, I find myself playing uplifting songs in an attempt to drown out the memories. Christmas is probably forever ruined for me because of the onset of the OCD that time in 2011. Kinda a PTSD thing going on there.
Whenever I hear a christmas song, instant trip down memory lane from hell.
Fourth of July is ruined too thanks to my relapse in July this year.
I want to be surrounded by joy, by kindness, by peace, by good things. I have seen enough of the other side of the spectrum for this lifetime.
I want to be loved, and to love others, I want to have a fulfilling and useful purpose and still have time for myself.
I want to be followed by a hundred billion times more light than I ever was darkness.
The tagline at the bottom of the site today says "Today is the first day of the rest of the mess.", but I vehemently disagree. Today is the first day of the rest of my life, and it's going to be good now, because I deserve it. I've paid my dues. I'd just like your blessing for the good plan I've laid out, and your help in making it come to pass.
Sincerely, SubsentientneitnesbuS.
Alright, time for confessions. I only post journals in an attempt to get Ethanol_fueled's journals off the front page. So here is my anti-Ethanol_fueled journal entry. Maybe, in a future when Soylent News is a self-respecting news aggregator, such measures will not be necessary. (And yes, I know, that at present they are futile.)
I just used my last moderation point to troll rate someone. OK, it was not someone, it was an asshole. Seriously, who are these people that in this day and age can keep spewing racism, sexism, and how they are metrically challenged in the organ department? Guns? F**king Cowards. If you need a gun to defend yourself, you are probably a criminal. Bad boyz? White Bad Boyz? KKK Boyz? You know, if you are an oath keeper, you are already a lying sack of it. Defend the Constitution? You do realize that this means you have to be able to read the Constitution first, so you know what it is you are defending? Else, perchance, you find yourself defending the Protocols of the Teutonic Knights! You know, Nazi shit?
Recently I came across a video of John Cleese explaining Fox News with the insight that you have to know at least enough to be right in order to know you are wrong, and this is exactly what conservatives are lacking. Ah, here it is! Now this is the problem, and it does point out how arguing with these people is really no use at all. Seriously? Cops saying they _are_ the cop that shot the kid? Are they actually saying that they are racist child-murderers? See: too stupid to know that they are stupid.
I think it is nice that Soylent News covers these terribly fascist events in American, if only for the edification of the rest of the world. But let not all these people who do in fact listen to Fox New think that somehow they are right, or even in the majority. Liberals have more guns that conservatives, and they are better shots, since they do not get all emotional about their targets.
So I am not saying that we kick out all the neo-conservatives and neo-liberals and neo-nazis, I am just saying that if you are one of those, expect no mercy from things like reality and logic and humanity, and ethics. We owe you nothing less.
OK, my contributions of late seem to be more complaining than anything. I really try not to smite idiots with negmod points, seriously! But I do hang on to the last few mod points, just in case a late-breaking egregious post should be made. And here is my latest complaint. Mod points come with a nice notification, and even some direction to proper usage. That is all well and good. There also is a date and time of expiration for said mod points. But my expiration time always seems to be an hour off. I am assuming this time is changed to local 24-hour format, no problem. Perhaps Slashcode is unaware that not all time-zones practice Daylight Savings? Or perhaps I am not where I think I am. I guess I could just remember, for Soylent News Mod points, that 18:05 is not 6:05 local time, but in fact 5:05. Wait, is it leap ahead, or fall back, if you do not have Daylight Saving Time? (And what fools think we can save daylight? If we could, the whole solar power at night thing would already be solved.)
Any way, it is probably better that I lose mod points before I can use them in nasty ways. Live long and prosper, whatever time matrix you find yourself in.
For a few months now, aqu4bot's Windows support has been broken. Compilation would fail because nonblocking sockets were not properly doable in Windows the way it was intended. I was using the same network core I use on the IRC protocol to download HTTP.
It worked, except when it hung. This affected mainly the $title command. So I added the nonblocking, which was necessary, but this broke all Windows support. I was reluctant in using libcurl because although I love libcurl, I only had two commands for aqu4 that used HTTP. That was $ddg and $title.
The good news is libcurl is VERY portable and works well under Windows. So needless to say aqu4bot's Net_GetHTTP() function was removed in favor of a new CurlCore_GetHTTP().
There is now a hard dependency on libcurl, but that's fine I suppose, since I now have my precious and arguably useless Windows support once more.
To celebrate, I created a new icon for aqu4bot that is used as the icon for the Windows executable: http://universe2.us/collector/aqu4bot.png
There's still a small issue with $time, as Windows does not have zoneinfo so I can't set the timezone properly, but everything else appears to work!
Once in a long while, I post something that is beyond the ken of mere mortals. Unfortunately, mere mortals take this as a disagreement of opinion. But in fact, it is not. I am right, and they are wrong. You may think I am being conceited in this, but I assure you, I have grounds for my position.
So I am wondering why, in the grande scale of things, I am disturbed when some ill-advised comment of mine is appropriately modded down. Yes, I probably had it coming. Yes, it is probably justified. And if I had just waited half a day, this would not have happened. But can't you see that I have gone from a karma rating of 50 to just a paltry 49!! Oh, really, not a big deal. We are all after the same thing here (except for those libertarian free market fucks that are trying to pump the site for all it's worth and then sell us out down the river to some corporation niced.).
Yes, I mod down posts, especially if they are ethanol fueled and full of racism, misogyny, and ignorance of too many categories to be categorized. Or Republican. We need to stand up for reason, science, evidencem and logical thinking. Any religious stuff is right out, and any libertarian/Republican economic ideology is on the same level. No bias, no prejudice, just that bullshit needs to be called bullshit, and not allowed to pass as polite conversation.
We are the last best place on the internet. We are People, we are soylent. We have to act like people, people who can think, reason, argue according to the rules of logic. That is all I ask. I hope it is not too much.