Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


My new distro: Night Linux

Posted by Subsentient on Monday February 16 2015, @11:10PM (#1021)
6 Comments
Code

I've started work (and nearing completion) on a new Linux distro for i586 and up with 64MB of RAM. It's called Night Linux. The origin of the name is a topic for another day.

Night Linux is a small, ~20MB CLI only distro intended for system rescue/utility purposes.
It's the kind of thing you make bootable on your MP3 player to keep with you in a pinch.

Among its features are: Epoch Init System, elinks browser, ircii IRC client, support for mounting and creating/repairing EXT2/3/4, BTRFS, NTFS, and FAT12/16/32 filesystems, ms-sys to repair Windows boot records, GNU parted, syslinux/extlinux along with MBRs in /usr/lib/syslinux for bootloaders, Bricktick brick breaker game, busybox userland, bash 4.3.x, nano editor, OpenSSH, squashfs tools, and more.

Night Linux is based on bleeding edge code with a 3.19 kernel and glibc 2.21.
I haven't published source yet, (waiting to create a project page) but if you want it, I'll provide it upon request.

Get the first alpha here: https://www.dropbox.com/s/9h3wa5ylczjrrt7/NightLinux-Alpha1.i586.iso?dl=1

Feedback welcome.

mini-slashcode-wannabe project

Posted by crutchy on Monday February 16 2015, @09:37PM (#1020)
0 Comments
Code

been mucking around with a little website thing intended to be sort of similar to SoylentNews/Pipedot/etc

it's written in php and is intended to be very simple

site (not yet fully functional) is here: http://news.my.to/

sample story with a bunch of nested test comments here: http://news.my.to/story/1

code for site is here: https://github.com/crutchy-/exec-irc-bot/tree/master/website/news.my.to

so far it has basic rewrite rules, templating for html, uses pdo, no classes (procedural only)

code is unlicensed (https://github.com/crutchy-/exec-irc-bot/blob/master/unlicense.txt)

SN, Specify timezone please..

Posted by kaszz on Sunday February 08 2015, @01:58PM (#997)
4 Comments
Code

When specifying timestamps like "Your points expire at 2015-02-09 12:34.". Also specify which timezone you are reffering to. Otherwise it can mean just about ANY timezone. Confusion galore.

SubStrings and aqu4bot's improvements from it

Posted by Subsentient on Sunday February 08 2015, @11:55AM (#996)
0 Comments
Code

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.

pastebin

Posted by crutchy on Sunday January 25 2015, @12:37PM (#972)
0 Comments
Code

had a go at making a simple pastebin. nothing fancy (no context highlighting, line numbers, etc)

http://paste.my.to/

similarish workings to the url shortener

Moral hazard: I learnt something today

Posted by Yog-Yogguth on Sunday January 25 2015, @10:01AM (#971)
0 Comments
Answers

How deeply unfortunate that it's given such an easily misunderstood ‘name’.

Want to sum up most or maybe all of humanity's problems in two words?

The specific meaning of ‘Moral hazard’ should be shouted from the rooftops. Every single human being ought to be taught what the concept means and the fact that it does not just apply as a term in economics. It describes every major problem inherent to politics I can think of. The fallacies of ideology and ideals or principles, the limits to society, the inescapable “death” from complexity, automatic corruption and institutionalized cronyism, the pressures towards groupthink, secrecy, pressure groups and lobbying, and everything else, it's all there, it touches everything.

If someone wants to make a truly better society and/or if they have to rebuild from the ground then they should focus on removing and inhibiting as much moral hazard as possible. Maybe it's all it takes but the amount of work it requires is enormous.

The first step towards that would be to identify all of it in anything new or old.

url shortener

Posted by crutchy on Sunday January 25 2015, @03:08AM (#970)
2 Comments
Code

had a go at making a url shortener. very basic but seems to work

http://o.my.to/

you can also use it from soylent irc with the command "~shorten %url%" (must be identified with nickserv)

Relationship Hacking: Part 4 - Unicorn Hunting?

Posted by Snow on Tuesday January 13 2015, @07:46PM (#948)
8 Comments
/dev/random

So, the other day, my Wife and I were driving on the highway. She turns to me, and says, "I think I want to be involved. We should create a couples profile, and see if we can find a girl for a Triad". (A Triad is, basically, a serious three-way relationship where ideally everyone loves each other.)
"Great!", I say, and we drive on in silence as I try to process this.

Now I don't know how many of you are familiar with online dating, but it really sucks to be a guy on an online dating site (unless you are really, really hot). For a guy, it's mostly looking at pictures of women (some attractive, most not), then reading their profile, and sending a message that is hopefully good and original. It takes a lot of work, and a lot of time. The vast majority of your messages will be unanswered. It's tough not to feel like the mud on their boots that they try to scrape off, but there are entire forums related to this subject. Now, I'm not a terrible looking guy, but I am married and open about that, so that deters a lot of women.
My wife knows that the online dating scene hasn't been the easiest thing for me, and so her suggestion to make a couple's profile was her way of helping. My wife is pretty damn good looking, with beautiful reddish hair. Finding a women with her as part of the package might make things easier.

Now for me, a Triad is really my ideal end game. The thought of having a wife and a girlfriend that not only get along, but actually love each other would be amazing! My mind was racing for much of the day, trying to sort everything out.

This brings us to Unicorns. So, what is a Unicorn? Well, a Unicorn is a creature that is exceedingly rare with mythical qualities. So basically: a single (or at least available) woman, who is bisexual, attractive, open to being a "secondary" in an existing relationship, intellectually stimulating (for me), and spiritual (for my Wife). That Unicorn seems like a pretty amazing person...

Often couples looking for Unicorns unilaterally set rules that will apply to the Unicorn. Things like only sleeping with the Unicorn together, rules around being seen in public, loving them equally (as if that is even possible), etc. Now, we aren't really heavy on the rules (practice safer sex, basically), but many couples do have these rules, so Unicorn Hunters generally have a bad rap.

So, at the end of the day, we sit down on the couch and have a deeper conversation about things. I ask her why she wants to be involved now, when she didn't before. What changed her mind? I've been complaining about how crappy internet dating is, so I'm worried that she is only agreeing to this to try and help me out.

I make her read a really good article on Unicorn Hunting to make sure that we are on the same page. I don't want to set a lot of rules to restrict the relationship. The Unicorn is a person too, and they deserve to be treated fairly. If we do this, we are going to do this right.

We have a lot going on in our life right now. She has an appointment next Monday to have her UID taken out because we are going to try to have a baby (I'm terrified about that...). My Mom has been battling with booze for years and my sister thinks that things are getting worse, so she wants to stage an intervention type thing. I had to tell my sister that while I support her confronting our Mom about the drinking, I have a full plate and I can't guarantee much help on that front from me. I told my sister about my Wife and mine's relationship and how we were trying an open/polyamorous style of relationship. I trust my sister a lot, and I was really worried about coming out to her about this, but she really took it well. She didn't seem that surprised, mostly curious. She said that my wife and I have such a good relationship, that she could see how this could work. That was a really pleasant surprise. I've been really worried about opening up to my family... I'm sure that there are still mines to navigate there though. I have a big family, and some of them are really Catholic.

Anyways, so back to Unicorn Hunting... I didn't want my wife to be involved because she pitied me and my failures at online dating. I made her read the Unicorn Hunting Article. She reads the article, looks up at me, and says "I'm relieved".
"Why is that?", I say. It turns out that she did suggest becoming involved not for herself, but for me. Her #1 priority in life right now is a baby. She doesn't feel that she has the time or motivation to be involved with another person right now. I suspected as much, so while a little disappointed, I was happy that we could get to the bottom of things, and that we were doing things for the right reasons.

So, it's back to me being solo. I'm cool with that. At this point, I want to prove to myself that I can get a girl on my own. Everything in life that is worth a damn requires effort.

Well, back to the world of dating...

****

P.S. I'm sure some of you are thinking "Open Relationship + Baby = Not good (that poor baby)". Here's the thing... I'd wait another 5 years to have a baby if I had the choice, but I don't. My wife is 32.5 years old, so we are running out of time to have babies. Having kids is important to us, so biologically speaking, now is the time to have kids.

My wife an I both come from divorced parents, so we know all about a kid living with a broken family, and that is not something we want for our kids. My wife and I are both fully committed to each other and our relationship. Even though we have decided to take an unconventional path, I believe that our relationship is still much more stable than the average. Maybe both of us having parents that ended up cheating and breaking up the family gives us different perspectives and opinions. Remove the desire to cheat, improve communication, and maybe we can have a happy marriage while being free to explore ourselves as well. It won't be all smiles and rainbows, but neither of us are expecting that.

****

P.P.S. I'm curious to hear feedback on my journal entries. Do people enjoy them? Should I continue? Is this the right location for them? I realize that this is a tech site, but it's where I feel comfortable. Plus, there is a link for here for a journal, so I just start typing. There are a lot of people here that are married, and I'm sure there are some that may relate to my journals. Maybe it's helpful in some bizarre way. For me, I just like putting it out there. I like collecting my thoughts and writing it down. I also think that it might be neat to look back on years from know. Let me know what you think.

If you like my journal entries, add me to your Soylent Friends list. You will get a message when I make a new entry. Thanks for reading!

-- Snow

EDIT: Here is the article on Unicorn Hunting. It's a really great read:
http://davidlnoble.livejournal.com/176039.html

Epoch Init System 1.2.1 released.

Posted by Subsentient on Sunday January 04 2015, @06:19AM (#930)
0 Comments
Code

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.

Epoch Init System homepage
Download Epoch 1.2.1 (tar.gz)

Secure login with soylentnews!

Posted by kaszz on Tuesday December 30 2014, @11:01PM (#920)
0 Comments
Security

Anyone that has used the login from the main page using the login dialog at the top-right will be silently surprised with the login being done using https but once completed it will switch to http. And thus dump your username association with your IP-address along with the session cookie for all three letter organizations to grab. Or your local hackers to abuse for impersonation.

There's a workaround for this. Simple go to any article from the main page. Click on the [Reply] link right underneath the article text. If you are not logged in ie missing session cookie. A login dialog will be added to your comment reply dialog. Just fill in username and password and click [Preview]. Viola.. logged in!

And don't forget ONE mistake on revealing your username association with IP, browser header etc.. It's there for a eternity or something bad happens to some harddisk racks in a certain location..

Happy SSL login to you! ;-)