Posts for: #Info

TheLounge Heap Size

Finally I have something technical to contribute. God dammit. So I’ve decided to embark on a journey of pushing software called thelounge to it’s breaking point. I’m running it on a raspberry pi 4 with 4GB of RAM and little much else to do except placate me. I set it up to record -1 lines of buffer and I’m connected to a bouncer that’s on multiple networks with a handful of channels on each network. Some are large volume channels with lots of comms.

[]

Pi

I had seen a video recently on “Explaining Computers” and I noticed that the Raspberry Pi 4 now supports booting from a USB drive. Considering that it also has USB 3.0 support, and you can readily find SATA/USB 3.0 adapters, I think this makes for a pretty promising Pi 4 build. I’m considering snagging another along with the necessary cabling and a SATA drive to create a reasonably decent headless server with some beefy storage and better access times than SD flash. I think I’m going to keep the existing Pi 4 that I have running as is, as a general purpose and print server, because it just works. But I really feel like I need a Pi 4 with 4 TB of storage, because why not? I’m pretty sure I can put it together relatively inexpensively and I might dabble in some NextCloud or OwnCloud crap to boot. We’ll see. I always have too damn much stuff going on, but this is the goal at least.

[]

Super Mario 64 Windows

Super Mario 64 Windows Edition

Some crazy cats decided to reverse engineer and port Super Mario 64 to Windows and DirectX. So here it is. Download it.

sha256sum: 6aca0bf380e62ec7ebe7c2b44597d9a5b0f29507ea59474acbdda285f7ada7b6 SMB64PCdx12.rar

VirusTotal Result

See the VirusTotal result to guarantee the download above is clean. It’s pretty awesome, but you’ll need to install Steam and run it through Steam in order to configure a controller. Personally I think the Switch Pro controller is the best bet for playing, but that’s all a matter of opinion. Also, I’ll be sure and let you know if Nintendo tries to sue me to take it down. Fuckers. 😂

[]

AI Assisted Upscaling

So this is “in the works”, I haven’t succeeded yet. The ultimate goal is to be able to upscale a shitty 70kb jpeg to a megapixel jpeg using trained neural networks. Badass, rite? Well, the disclaimer here is that I’ve been chipping away at this project and haven’t yet got a functioning setup. So without further ado, here’s my fucking trainwreck.

I started off following the guide at alexjc/neural-enhance. My first attempt involved me thinking I was slick and I could just grab the docker container since it’s already installed, configured, and the neural networks trained with more than a few already very usable targets.

[]

Minbif on FreeBSD

I don’t remember at all why I did this. I can’t remember if the minbif port was broken or what my motivation was. I downloaded the last version of minbif and started editing crap until it compiled on FreeBSD 10.2. Which, with this patch, it does. In any case, it’s going here for posterity, I guess.

diff -Naur minbif-1.0.5/src/im/account.cpp
minbif-1.0.5-new/src/im/account.cpp
--- minbif-1.0.5/src/im/account.cpp     2011-12-04 09:24:51.000000000
-0500
+++ minbif-1.0.5-new/src/im/account.cpp 2016-01-26 17:20:54.418450000
-0500
@@ -272,7 +272,7 @@
                                else
                                {
                                        char** prpl_formats =
g_strsplit(prplinfo->icon_spec.format,",",0);
-                                       ImlibLoadError err =
                                        IMLIB_LOAD_ERROR_UNKNOWN;
+                                       Imlib_Load_Error err =
IMLIB_LOAD_ERROR_UNKNOWN;

                                        close(temp_fd);
                                        /* Try to encode in a
 * supported format. */
diff -Naur minbif-1.0.5/src/im/auth_pam.h
minbif-1.0.5-new/src/im/auth_pam.h
--- minbif-1.0.5/src/im/auth_pam.h      2011-12-04 09:24:51.000000000
-0500
+++ minbif-1.0.5-new/src/im/auth_pam.h  2016-01-26 17:15:57.047434000
-0500
@@ -21,7 +21,7 @@

 #include "auth.h"
 #include <security/pam_appl.h>
-#include <security/pam_misc.h>
+#include <security/openpam.h>

 struct _pam_conv_func_data {
        bool update;
diff -Naur minbif-1.0.5/src/server_poll/daemon_fork.cpp
minbif-1.0.5-new/src/server_poll/daemon_fork.cpp
--- minbif-1.0.5/src/server_poll/daemon_fork.cpp        2011-12-04
09:24:51.000000000 -0500
+++ minbif-1.0.5-new/src/server_poll/daemon_fork.cpp    2016-01-26
12:14:09.049463000 -0500
@@ -20,7 +20,7 @@
 #include <cassert>
 #include <cstring>
 #include <cerrno>
-#include <glib/gmain.h>
+#include <glib.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <arpa/inet.h>
diff -Naur minbif-1.0.5/src/server_poll/inetd.cpp
minbif-1.0.5-new/src/server_poll/inetd.cpp
--- minbif-1.0.5/src/server_poll/inetd.cpp      2011-12-04
09:24:51.000000000 -0500
+++ minbif-1.0.5-new/src/server_poll/inetd.cpp  2016-01-26
12:09:56.808247000 -0500
@@ -17,7 +17,7 @@
  */

 #include <cassert>
-#include <glib/gmain.h>
+#include <glib.h>

 #include "inetd.h"
 #include "irc/irc.h"
[]

Totient Calculator in C

Rewrote my totient calculator in C. It’s pretty much a direct translation of the excrement I wrote in Rust. Be gentle, there are obvious points that I miss completely in C that veterans in the ancient language would scoff heartily about. I don’t yet know what the hell a struct is for or the extents of threading. All in good time.

So here’s my uncommented and fully unnecessary data type usage.

[]

Chamfer Calculator in C

I’ve converted the Rust Chamfer Calculator to C for shits and giggles, and to learn something new. If you have any recommendations on tutorials for C socket programming, please feel free to contact me. Without further ado, here’s my garbage:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

double to_radians(double degrees);
double chamf(double angle, double depth, double bore);

int main(int argc, char *argv[])
{
        if (argc < 4 || argc > 4)
        {
                printf("Usage: %s angle depth bore\n", argv[0]);
                exit(0);
        }

        double ang = strtod(argv[1], NULL);
        double dep = strtod(argv[2], NULL);
        double bor = strtod(argv[3], NULL);

        double cha = chamf(ang, dep, bor);

        printf("Angle: %f\nDepth: %f\nBore: %f\nChamfer Diameter:
%.16f\n", ang, dep, bor, cha);

        exit(0);
}

double to_radians(double degrees)
{
        return degrees * (M_PI / 180);
}

double chamf(double angle, double depth, double bore)
{
        return (tan(to_radians(angle)) * depth) + bore;
}
[]