Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


exec irc bot

Posted by crutchy on Tuesday September 30 2014, @02:50PM (#695)
0 Comments
Code

moved nick tracking inside bot process cos i was having all sorts of grief trying to make it work the way i wanted in a separate script. seems to work pretty smoothly now, and i don't need to worry about pausing/unpausing the socket reader.

starting fidgeting with irciv again now that i got some reliable generic authentication features. trying to consolidate all actions into a single alias and get player authentication back up.

event response is a bit more readily available to scripts with event handler registration. the bot keeps track of command/handler pairs in an encoded bucket, and on various events the register is queried and any handlers that exist are executed. this opens up possibility to have the bot trigger a script on an event without using the exec.txt file, and as the register is a bucket it can also be edited from within irc. will have to think about what sort of security risks this might pose, but ability to manually edit buckets is limited to privileged users so not overly worried. irciv will register event handlers on startup to manage player tracking, which was formerly done in cmd.php (eventually want to remove cmd.php, to be replaced with registered event handlers in startup.php). some templates are supported in event handlers; %%nick%%, %%trailing%%, %command%% and %%params%%, which are replaced with actual values when the handled event occurs

a little SN funding feed has been enabled. polls home page slashbox every 15 mins. message appears in #soylent if funding amount increases

comment feed has been changed to use simpler xml feed and only top 20 articles are scraped, as i found the latter 30 articles never got that many comments (assuming probably cos they fall off the SN front page). /join #comments

--
http://sylnt.us/exec
https://github.com/crutchy-/exec-irc-bot

Hello robots :P

Posted by Yog-Yogguth on Monday September 08 2014, @11:16AM (#653)
1 Comment
/dev/random

A rigid notion of determinism turns it into a mechanical folly and inverts the importance away from higher functions and towards the lowest detectable causal events, it creates a world in which ultimately the smallest and most remote causal interactions are given disproportionate amounts of importance even though such interactions are constantly changing at speeds far faster than the results they are supposed to have deterministically forced into being. With such an outlook it wouldn't be “turtles all the way down” but instead “turtles all the way up”.

By analogy of a computer program the importance according to such determinism is given to the bits flipping between zero and one rather than the higher structures ruling their behavior.

Such determinism remains technically true but becomes devoid of meaning, comprehension, and value[¹], and thus also without importance.

Instead for any given end result determinism acts as a negative feedback loop in relation to its own importance when given enough complexity: a robot operating its algorithms on the basis of what might as well be an infinite number of ever-changing, causal, and mutually connected variables cannot remain a robot, it is forced into random output and/or the beginnings of intelligence where it chooses which output to give and later also chooses the reason why it is supposed to be the correct output or why a different output is more correct.

Hmm, googly eyes or Einstein afro? It makes sense to me…

(Also ¹ looks like a nice explanation of why “pop” determinism and nihilism so often end up as best friends.)

(And another tangential: if it was possible I wonder what an inverse square type of law would look like for each causal step in determinism, the fact that it rained yesterday has no discernible impact on me writing this journal entry (but now it has and thus two points were made rather than one: one about determinism and one about indirect Wittgensteinian word games).)

The focus of this post was really meant to be the part at the end that I made bold.

To me it makes one or two connections in a way that I haven't seen before (and I know about system complexity and emergence and such). In some way it feels a bit more direct and explanatory tying in a correct understanding/evaluation of determinism as well as (possibly the most basic) evolutionary pressure/fitness challenge. In this way it gets very hands on and mucky (conceptually, and also conceptually reducing the challenge of creating intelligence to that of triggering such a first move and then escalating it). Has anyone seen anything similar elsewhere?

P.S. Yet another tangential: a different kind of amusing folly, more entertaining than determinism but maybe not all that different after all?

exec nick tracking

Posted by crutchy on Sunday September 07 2014, @02:02PM (#652)
0 Comments
Code

exec now has a basic nick tracking script that hooks the join, nick, quit, kick, part and 353 events. this feature is similar but nowhere near as complete as xchat's (or $insert_client_here's) user list.

it has lead to the addition of internal stdout commands for retrieving a space-delimited listing of bucket indexes, and commands for pausing and unpausing the processing of irc data, to prevent corruption of bucket data that might occur due to multiple processes triggered by irc events trying to read/write to the same bucket(s) simultaneously.

http://sylnt.us/exec#Buckets

nick tracking enables scripts to find out what nicks are in a given channel or what channels a given nick are in. currently only channels shared with the bot are tracked, but with additional event hooks (such as a whois 319 numeric) additional channel info can be tracked.

with proposed addition of whois account querying (330 numeric) by the user tracking script, other scripts will be able to authenticate instructions with a simple function call.

the irciv script was originally designed with player authentication using the 330 nickserv account numeric. however it was messy, with irciv-specific code sprinkled throughout the main event handling script (cmd.php). the generalized tracking system will give all scripts access to the same user data via a small set of lib functions.

--
http://sylnt.us/exec
https://github.com/crutchy-/exec-irc-bot

Bitcoin payments

Posted by The Mighty Buzzard on Friday September 05 2014, @05:09PM (#646)
1 Comment
Soylent

<OfficialDevHat>
So, I'd given an estimate of "by this weekend" for crypto-currency payment processing. I was pretty close for not even having looked at it or picked a payment processor yet. It's looking like I'll finish Monday unless I find another 3-4 hours of coding in my brain today. I can't really speak to when it will deployed to prod afterwards.

The skinny of it is I went through two other payment processors before settling on Bitpay. It would have been nice to accept litecoin and dodgecoin as well as bitcoin but some payment processor who shall remain nameless had a dev environment that did not mirror their prod environment and all the documentation for the API was for their dev environment, so I killed with fire all nine or ten hours of coding I'd done to process payments with them and went back to looking for another processor. Maybe one of these days they'll update and bring some sanity to their system and you lot will be able to use litecoin and dodgecoin here. Until then, bitcoin payments via Bitpay are currently working from my dev environment but in need of some finishing touches and testing before being deployed for you lot to use.
</OfficialDevHat>

<PrivateCitizenHat>
A quick word about Bitpay. If you ever want to receive USD when being sent BTC, I personally highly recommend using them. Aside from test.bitpay.com not being mentioned in the docs at the time, they were bloody brilliant to code against. As a random code monkey on the Internet, they have my resounding personal endorsement.
</PrivateCitizenHat>

irc comment feed

Posted by crutchy on Monday September 01 2014, @02:28PM (#630)
2 Comments
Soylent

if you're chatting away on soylent irc (irc.sylnt.us) check out #comments for a SoylentNews comment feed

the feed is based on the last 50 articles in the atom feed, and is updated every half hour

also highlights score 5 comments

examples:

<exec> *** new comment: Anonymous Coward (Score:0) "Microsoft Defies US Court Order, Will Not Give-up Emails" - http://soylentnews.org/comments.pl?sid=3678&cid=88065 (parent: http://soylentnews.org/comments.pl?sid=3678&cid=87969)

<exec> *** score 5 comment: Anonymous Coward for article "Microsoft Defies US Court Order, Will Not Give-up Emails" - http://soylentnews.org/comments.pl?sid=3678&cid=87971

proposed features include opt-in personalized feeds (to pm) with score threshold and other settings

suggestions/criticism/feedback/etc is always welcome

--
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/comment_feed.php

On Mod-Bombing

Posted by The Mighty Buzzard on Thursday August 28 2014, @03:42PM (#618)
20 Comments
Soylent

So, mod-bombing is becoming a problem. Where mod-bombing is defined as blowing a bunch of moderator points on one person's comments in pursuit of a personal vendetta. I think we're pretty much all in agreement that this type of behavior is NOT what the moderation system was designed to do and can't be allowed to continue.

So, I, personally, not anyone else on staff or the site as a whole, would like some input to use to further refine or outright change my opinion on how to deal with the matter. Bear in mind that I am not the person who gets to decide this, just the guy who would likely be coding it up.

At the moment my favorite idea is that after N downmods from person A to comments made by person B, person A be presented with a page offering them the choice of removing all their moderations from this set of modpoints or to continue on with the knowledge that an admin WILL be checking their moderations for today with the possible consequences of reversal of their moderations and their ineligibility to receive mod points again for a number of days ranging from 1 through infinity.

What say you, SN?

exec update

Posted by crutchy on Wednesday August 20 2014, @02:43PM (#590)
0 Comments
Code

~help <alias>
gets first 3 lines from section of this wiki page: http://wiki.soylentnews.org/wiki/IRC:exec_aliases
followed by a url

~staff meeting
outputs paragraph in site news slashbox containing the word "meeting", with paras delimited by <br>

scripts can call lib.php function bot_ignore_next() to set a flag in the bot that tells it to ignore the next message, which is useful if outputting aliases that you don't want to be processed (such as for ~help)

~count <nick>
counts number of privmsgs in channel. also indicates over how many days and average of privmsgs per day.

rtl test

Posted by The Mighty Buzzard on Tuesday August 19 2014, @02:01PM (#585)
3 Comments
Slash

This text should be RTL if overrides are not stripped out.

exec update

Posted by crutchy on Wednesday August 13 2014, @01:03PM (#574)
0 Comments
Code

some recent goings on with the exec bot that generally lurks in #Soylent channel on irc.sylnt.us:

- sed supports regex through use of preg_replace (FoobarBazbot's awk script no longer running under exec)
- reserved alias for logging script
- disabled ping script for auto-restart cos it was a disaster (i think i fixed the problem by disabling the ping until connection is established but not going to bother testing for now)
- implemented support for bucket_append messages, which allows creating lists from multiple concurrent processes without fouling each other (needed for users.php which builds lists of channels, nicks and nickserv accounts using list, who and whois irc commands)
- refined the weather script a little as a result of some feedback (thanks to those involved)
- put weather and time functions into lib files to make them accessible from a new welcome script that can (if enabled) show weather and local time on joining a channel (if your nick/location is registered using ~weather-add or ~time-add)
- created switches.php in an attempt to make enabling/disabling features on a per channel basis a little more uniform (used by sed and welcome scripts)
- script created to add suggestions to the wiki, using ~suggest (appends to a section of an article, with bullet formatting)
- added stats aliases ~first, ~last, ~find-first, ~find-last and ~count that make use of cached chat logs
- added interface for adding/editing/deleting ~define sources
- added ~killall admin command to terminate all scripts/programs running under the bot process
- admin setting to ignore/unignore nicks added
- added script start timestamp template for the exec.txt file

hoping to eventually get the nickserv account checking stuff in users.php to a point where i can use it to fix up the player authentication in irciv cos i really wanna get back into that

haf fun :D

===
https://github.com/crutchy-/test
http://wiki.soylentnews.org/wiki/IRC:exec

Simple proof against Basilisk nonsense

Posted by Yog-Yogguth on Monday August 11 2014, @06:15PM (#570)
2 Comments
Answers

I didn't pay much attention to this so please excuse me but the garbage processor spat this out today:

Despite accepting all the flawed assumptions such "AI" would itself/themselves be committing the same "criminal" acts of postponement by wasting resources on such a scenario instead of better AI.

Hopefully that's not an example of cryptomnesia.

Anything more intelligent than even me (intended as a low reference point) would have far more interesting things to do than retarded human sadism, the same goes for any $deity worth the title :)

Well that's already too much attention wasted on an idiotic distraction (doesn't matter if it's genuine idiocy or staged).