Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


script for automated test comment submissions to dev

Posted by crutchy on Wednesday May 06 2015, @01:21PM (#1200)
1 Comment
Code

to bytram:

i've bashed together a scripty that will hopefully work as a starting point for automating some stuff on dev

exec command "~slash-test" (restricted to use by your nickserv account, and bot admins) may be run from either #dev or #test channels. at the moment it won't work cos i've already submitted the test comment (dev will return a duplication error), but its ready for preparation of test comment files similar to this one: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/slash_tests/test01

note: the parent element should contain the filename of the parent test file if applicable (leave blank or omit for root level). ie: for child of test01, put <parent>test01<parent>

source code files here:
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/slash_test.php
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/sn_lib.php

VT100 CSS Fix

Posted by takyon on Monday May 04 2015, @11:50PM (#1196)
0 Comments
Code

blockquote {border-left:3px solid #0F0 !important; padding-left:1em !important;}

/* Submissions */

.data .status0 {background:#FFF !important; color:#080 !important;}
.data .status0 a {color:#080 !important;}
.data .status0 a:visited {color:#0A0 !important;}
.data .status0 a:hover {color:#0C0 !important;}
.data .status1 {background:#800 !important;}
.data .status2 {background:#256625 !important;}

Relationship Hacking: Part 7 - An Amazing Night

Posted by Snow on Tuesday April 28 2015, @05:05PM (#1187)
1 Comment
/dev/random

Last night was amazing.

You know those moments where you really connect with someone else? When you see them in a new light and everything is great? My wife and I had one of those moments last night.

It was a beautiful evening that felt like summer. My wife had the day off, and had picked up some burgers, beer, and wine for dinner. We started talking about our life, the future, poly, and kids. It was a truly happy moment for me. We imagine a future where my wife can go traveling with someone who likes traveling more than me while I stay home looking after the kids. We talk about opening our own business (a recurring dream we have had for years and years). I told her that I feel like my life is just starting.

Our one year wedding anniversary is coming up pretty soon. We talked about how our relationship was before we got married versus after, and it seems like we were different people then. Much more immature. Much worse communication. Less connection. It's amazing what can change in a year.

My other relationship is progressing very well too. We saw each other again last weekend, and had a great time again. I'm seeing her again on Thursday (for our 4th date). There is a definitely a spark there, and I feel that there is a very good chance that we will have sex that night - my first new sexual partner in over 12 years.

I am happy and loving life. It's been a long time since I've felt this happy.

-- Snow

Relationship Hacking: Part 6 - It's happening!

Posted by Snow on Friday April 24 2015, @04:01PM (#1178)
3 Comments
/dev/random

So...

Shortly after my last entry, I met a girl on Tinder. We met for drinks and and ended up chatting for a few hours. She is also poly and has a couple other partners. She's very smart and opinionated. We had a great time and arranged to meet again.

Last night, we met again for dinner at a fancy restaurant. She showed up in a super sexy dress and I couldn't take my eyes off her. We had another great time and are planning on seeing each other again this weekend. I can't wait!

Admittedly, it was pretty weird to be all fired up from a great date and then coming home to my wife. We cuddled in bed like we always do, but my mind was racing thinking about my date. It kinda felt wrong. My wife there with her head rested on my chest while I think about my date with the other girl.

I don't know what else to say, as things are still really new. New Relationship Energy (NRE) is intoxifying. Its something I haven't felt for over a decade, and I'm really excited by it! More updates to come. Hopefully good ones!

-- Snow

exec irc bot api

Posted by crutchy on Saturday April 11 2015, @09:53AM (#1149)
0 Comments
Code

currently developing a sort of api for the exec irc bot.

bit of background: exec is run as a single php script process in a terminal, which connects to the soylent irc server, but when commands are triggered from the irc channels, the bot spawns child processes to service the commands. command aliases are mapped to shell commands using templates to substitute data from irc (such as nick, channel, message, etc). child processes are usually passed data using command line arguments, and communication to/from child processes and the bot process is facilitated through child process stdin and stdout pipes.
eg: typing "~rainbow ciri is a butthole" triggers the shell command: php scripts/rainbow.php 'ciri is a butthole'

the bot creates a named pipe and dumps a bunch of data to it in response to events, such as when a child process is started, when a message is received from a child process stdout pipe, when a message is received from the irc server, etc.
the named pipe can be read by something simple like cat, but i've written another php script to read it. this reader script also has a tcp socket server which allows yet another program to access the data stream (remotely even), such as telnet.
this is fine for just reading data, but i wanted to be able to command the bot remotely using this api. this is achieved by starting the reader script as a child process of the bot, which then offers the reader script the same methods taken advantage of normal scripts through stdin and stdout. a couple of specific stdout handlers were added to the bot script for acquiring specific data, but the reader also has direct access to irc and other functionality using existing stdout handlers (/IRC and /INTERNAL being the main handlers, used to output a raw message to the irc socket and perform an internal command respectively).
with two-way communication established between a tcp socket in the reader script and the main bot process, with event data streaming, i wanted to make a pretty gui application that i could see what is going on, since the bot terminal can be a bit crazy (each irc message can result in output filling half the terminal or more, due to internal events and data messages).
my tool of choice is delphi 7 pro, so i've made a little app called 'execstat' that connects to the reader socket server and reads the data streaming from it and enables commands to be sent. its pretty basic at this stage, but hope to develop it into something that i can use to easily see which scripts are running, which buckets are being get/set, which channels the bot is in, which commands are being triggered by who and where, etc. also important will be the ability to trigger kill commands for scripts, since currently to kill a script i have to go to a private channel, get a list of running processes (using the ~ps alias) and enter the pid in a ~kill alias command. not hard, but would be nice if i could just click a button in a gui. lazy++

the socket in the delphi app reads in its own thread, and uses a synchronized event handler to give data to the main application thread.

my current work revolves around rolling my own unserializer classes to parse the php serialized arrays, which is necessary to be able to get anything useful from the data streaming into the socket.

this whole setup is probably way overcomplicated and rediculous, but i enjoy working on it. moar_complexity++

Relationship Hacking: Part 5 - Hurry up and Wait!

Posted by Snow on Thursday April 09 2015, @09:26PM (#1146)
8 Comments
/dev/random

It's been roughly 3 months since my last entry, so I figured it's time for another update...

My wife and I have spent a lot of time over the last few months reading everything about non-monogamy that we could get our hands on. It's been pretty great actually because prior to that, we hadn't really read the same books before. I had earlier done a review of 'Opening Up', and that book really only scratched the surface of the whole poly thing. I have since read 'More Than Two', 'The Polyamorists Next Door' (which focuses more on poly with kids), and have recently started 'The Ethical Slut'.

These books go into much more detail on the actual workings of a poly relationship. Things like time management, being poly with kids, and dealing with stigma. It's been great to read the books, and then discuss them with my wife to see where we stand.

While both my wife and I have been addicted to learning all about poly, we still have no practical experience. It's all just theory at this point in time. We really just want something to happen.

I've been continuing my online search for women, with abysmal results. I've been trying to improve my look, with some success, but its had a negligible difference as far as the dating scene is concerned. It's honestly been very, very depressing for me, as mentioned in my previous journal entry. I've spent many, many hours viewing profiles and trying to think of good messages to send. 80% of them don't even respond, and 19% do respond but it doesn't go anywhere. I acknowledge that I am looking for a very, very specific person and so the odds are already stacked against me, but it's really hard not to take it personally.

Some days are worse than others (of course) and on the bad days when I'm moping around the house, my wife has been amazingly supportive and tries to pick me up. Without her, I would be dangerously depressed. I could go into a rant about online dating and the imbalance of power between the sexes, but I'll save that for another day.

I'm really all about equality in a relationship, and as such, my wife has the exact same liberties that I do. I would never have one set of rules for me, and another set of rules for her - she is also free to pursue extra relationships, and it's something that I would like to see her do. Thankfully for my sanity, she is not interested in pursuing on her own right now. She wants to see how things go with me first. If she was actively looking, I think it would pretty hard to see men lined up around the block while I get nothing but crickets. As I read more about polyamory, I realize that this is a pretty common problem for men.

In other news, my wife has had her IUD taken out and we have been doing natural birth control planning for the last couple months. Talking about a Baby or Poly has basically been the focus of our life for the last year. Lots, and lots of talk and theory, but nothing real yet, which is frustrating us both. We are both just really anxious for something to happen, and when it does, I'll post it here.

-- Snow

exec irc relay

Posted by crutchy on Saturday April 04 2015, @12:08PM (#1132)
1 Comment
Code

per previous journal i set up a simple channel relay feed to enable status messages for ncommander's nethack stream, but since there has been a little bit of talk about other games (including dungeon crawl stone soup) i turned the feed code into something more generic so that other feeds could be added easily. now there's feeds for the rodney bot from #nethack (freenode) to #nethack (soylent), as well as feeds for a couple of bots from ##crawl (freenode) to #crawl (soylent). the code to dispatch messages containing keywords has also been made generic, so that if ncommander plays again his deaths can be easily dispatched to #soylent for our amusement :p
code for this feature can be found here: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/activity.php#L86-L115

another feature that was briefly mentioned in my last journal has been developed further to enable limited two way communication between someone in a soylent irc channel and someone in a freenode irc channel.
to send a message to a channel on the freenode irc network (that an exec minion resides in with forwarding enabled) an authorized user on the soylent irc network in a channel with exec can type "#freenode_channel > message" and the message will be relayed. if you're in the freenode landing channel on the soylent irc network (#freenode) you'll be able to see any replies pop up in there, but it can easily get hidden amongst all the traffic from other channels, so to enable a 10 minute automated relay to a different soylent irc channel, type "#freenode_channel > freenode_nick, message" and for the next 10 minutes anything that freenode_nick says in #freenode_channel will be relayed to the originating soylent channel. only messages prefixed with "#freenode_channel >" will be relayed from soylent to freenode so soylentils can still talk without anyone on freenode hearing, but using the prefix on the soylent end (not required on freenode end) enables two-way communication. the relay lasts for 10 minutes, but can be easily renewed as many times as you want by typing another message (on soylent) in the form "#freenode_channel > freenode_nick, message". if you want to see a list of currently active relays, type ".relays" and it will list freenode_nick, freenode_channel, soylent channel and time remaining (in minutes). use of this feature is limited to a list of nickserv accounts.
code for this feature can be found here: https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/activity.php#L133-L213

exec irc bot developments

Posted by crutchy on Friday April 03 2015, @09:20AM (#1128)
0 Comments
Code

re-enabled the ~submit alias so that instead of just pasting a link to irc, you can also (with smallest amount of additional effort) share it with SN users not on irc. syntax is really simple: ~submit %url%
just submits the description or og:description meta tag content along with the link, so makes for a pretty lame submission but its better than nothing at all (editors can always reject it if it sucks too much)

during NCommander's NetHack thing i tweaked the freenode relay script to output messages by the Rodney irc bot in the freenode #nethack channel to our #soylent channel when NCommander died in the game. also made it so that anything Rodney said was output to our local #nethack channel so that NetHack fans can see what's going on without connecting to freenode directly.

developed some macro functionality to enable authorized irc users to shorten otherwise long exec commands into shorter equivalents. came in handy for simplifying control of the freenode relay bot.
also made a compound macro (using exec's internal_macro lib function) to make it easy to talk through the relay bot from the SN irc channels to freenode channels.

we get a bit of spam occasionally in the wiki, and chromas is diligently blanking it out (despite not having authority to delete articles) as a means of spam control. a script has been developed to make it a little easier for him (and a couple of others in a list of authorized nickserv accounts). a spam page in the wiki can now be cleared with ".spamctl %page title%"

http://sylnt.us/exec
http://sylnt.us/execsrc

broke out ircd work into a separate github repo. currently working on ability to connect multiple times to a network with the same nick. idea is that if there are a few servers on the network you could connect to each of them, and then if one disconnects you can still use the other (redundant) connections. authentication of subsequent connections to the same nick is done using a connection id appended to the username field (username sent out doesn't include the connection id though).
the server is at a point where i can connect to it with hexchat a couple of times (server spits out a connection id on first connect, and i just paste that to the end of the username in second connection). i can then join a channel from either connection, which automatically joins for the other connection (weird to watch). then i can chat and the chat appears on both connections. its pretty funky to play with.
if the project goes anywhere (unlikely) it might be ideal to have a client that handles the redundant connections for you automatically rather than having to establish separate connections manually and have each one take up room in the server list. netsplits could be a thing of the past.
prolly will try to make it ts6 and rfc compatible, but still early stages.

https://github.com/crutchy-/ircd

April 1st, 2015

Posted by takyon on Thursday April 02 2015, @03:03AM (#1124)
0 Comments
/dev/random

A day that will live in e-fame-y.

Last weeks GIF story

Posted by TK-421 on Monday March 30 2015, @03:55PM (#1118)
0 Comments
Soylent

All weekend I was bothered by a reply someone had made to reply I had posted in the GIF story last week.

This morning I had decided to reply because I felt it was worth it. Unfortunately the comment was from AC so I doubt they would see it.

Essentially I had posted that contrary to recent opinion we conservatives do find value in vaccination. The reply comment was essentially along the lines that other countries do have official vaccination programs that they have good levels of success.

So why bother with the journal? I said I was bothered and to be specific I just mean that in my mind I had more to say and was trying to make the decision as to whether a tertiary reply was worth the effort. I decided to do at least a smidgeon of research and found a couple sources that indicate some truth to the matter. It opened my eyes a little bit. I was not thrilled about the source of the articles but there were at least two unique sources and articles. I am not ready to concede that the United States has the worst health care on earth but there is an important lesson; no matter how sure you are about something you can always benefit from a little research. Whether it proves you wrong or right it will always be worth the while. So while I didn't deem it worth the effort to reply to AC, I figured it was worth the journal effort.