Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


crunch has been re-tasked

Posted by crutchy on Saturday March 29 2014, @02:14PM (#239)
0 Comments
Code

no more searching

reset color:

~color -1

bold white:

~color 00

change color per mirc values: http://www.mirc.com/colors.html

~color 01

thru

~color 15

requote last in weird and wonderful ways (or show about):

~

bot doesn't quote itself (shows about)
atm only verbs ending in "ing" and a small set of nouns recognised, but this will grow

if you're interested in contributing (even just to the arrays) have a squiz at:
https://github.com/crutchy-/test/blob/master/bacon.php

anyone new to git, have a squiz at http://wiki.soylentnews.org/wiki/User:Crutchy#Git.2FGitHub
you can also edit directly on github (ideally only for simple changes such as additions to arrays).

todo: add collective noun substitution
todo: add ability to append arrays from within irc

thanks heaps mrbluze... ideas man and english extraordinaire

crunch irc search bot

Posted by crutchy on Thursday March 27 2014, @12:18PM (#233)
0 Comments
Code

https://github.com/crutchy-/test/blob/master/crunch.php

designed to quote either the last thing said by a nick or the last thing said by a nick containing a search query

usage:
~
quotes a little about string including github source link
~q or ~quit
tells bot to quit
~find nick
quotes last thing said by nick (in local recorded log files)
~find nick query
quotes last thing said by nick that contains query (in local recorded log files)

code is fairly short and (hopefully) sweet. no comments sorry.

TODO: search online logs @ http://logs.sylnt.us/

php irc bot for posting wiki content

Posted by crutchy on Tuesday March 25 2014, @12:29PM (#226)
1 Comment
Code

i was inspired to work on this after i saw mention of piping irc to the wiki @ http://wiki.soylentnews.org/wiki/CommunitySupport#Projects

it's been tested some but is still a work in progress.
getting around the anti-spam/anti-bot features of wiki is something i'll have to consult a wizard on.

https://github.com/crutchy-/test/blob/master/bot.php

i'm not a professional programmer so it probably sucks.
any criticisms etc are welcome, and if i can be bothered i may even take them on board, or you can do a pull request if you feel like having a play.

this is my first open source code file :-)

Known Main Page Issues

Posted by mechanicjay on Thursday March 20 2014, @08:15PM (#212)
1 Comment
Soylent
Are you seeing unexpected results on the main index when you're AC vs logged in?

There are 3 possible things going on that you should be aware of before you think that SN is *completely* borked. They are presented below in order of probability.
  1. Corrupted User Settings
    There is currently a bug with the way slash handles TimeZone information and user settings. Basically, it seems that user settings are somehow getting corrupted in the database leading to unexpected results. One of those unexpected results is that slash doesn't show you new stories in a consistent fashion. In order to fix it, visit your Homepage (link in the sidebar) -> Restore Defaults -> Set Time Zone -> Revisit the front page. We are aware of this issue and is in the dev pipeline. Please email dev@soylentntews.org if you're interested in helping out the development effort!
  2. Static Page generation and caching.
    Anonymous users get statically generated pages for the main index and article pages. This is run by some cron-like process in the backend slash daemon. The particular job that regenerates the static pages and updates the comment counter on the main index along with some other stuff, is "freshenup". This runs on some interval, (I believe its configured to run every 5 minutes currently). Combine that with a Varnish caching server sitting in front of Slash's Apache instance, which will cache for 5 minutes and Anonymous users can see up to a 10 minute lag in some information on the front-page vs. Logged in users, who get dynamically generated content all the time. This is an artifact of our current configuration and can be re-evaluated in the future, but for now, given the site load and the hardware we're running on, it seems to be working well.
  3. The "freshenup" task looses it's mind. (ie. SN is actually borked).
    There are times however, when the "freshenup" task goes wrong. At this point, static page generation and comment count updates stop occuring. A sysadmin needs to go bounce slashd at this point. This has occurred approximately 2 times in the month that site has been live. The symptoms are that when browsing as AC, stuff is more than 30 minutes out of date, story links are broken and comment counts are frozen in time (for all users), it could be that the "freshenup" process has hung, but a lag of up to 10 minutes is expected for AC. Please email dev@soylentnews.org if you think this is happening or hop into the #Soylent irc channel -- there are usually a bunch of staff and devs hanging out there.

Hopefully this will help to alleviate some confusion about when you should see differences and give everyone a little bit better idea of all how SN is put together.

bot talk

Posted by crutchy on Thursday March 20 2014, @12:24PM (#207)
0 Comments
/dev/random

some some notes & snippets from fun with the chat bots in IRC.
times are australian eastern daylight saving time.

[22:25] <@aqu4> crutchy: s/tim/blaat/
[22:27] <crutchy> $sr /i/u/s
[22:27] <@aqu4> s/u/i/
[22:27] <SedBot> <aqu4> /taalb/mit/s :yhctirc

[22:31] <NCommander> O_o;
[22:34] <crutchy> $sr /O_o/o_O/s :rednammoCN
[22:34] <@aqu4> NCommander: s/O_o/o_O/
[22:34] <SedBot> <aqu4> <NCommander> o_O;

[22:39] <crutchy> $sr /O_o/o_O/s :rednammoCN ## yas sb/
[22:39] <@aqu4> /bs say ## NCommander: s/O_o/o_O/

$sr ++nocab
/bs say ## $sr ++nocab
/bs say ## bacon++

yet to try (bender+aqu4+sedbot?):
xyz say first: bacon++
/bs say ## $sr /--/++/s :zxy

Windows Registry

Posted by mechanicjay on Monday March 17 2014, @03:55PM (#197)
5 Comments
/dev/random
I just had to hack my windows registry in order to update VMware tools. I haven't had to touch the windows registry in years. I forgot how much it sucks. Maybe if the interface was better it might be tolerable, but seriously, regedit -- still in 2014?

Is it wrong to prefer the *nix approach, of each piece of the OS having it's own small and mostly manageable config file?

git/github

Posted by crutchy on Friday March 14 2014, @10:16AM (#191)
3 Comments
Code

Currently trying to learn how to use git and github.
http://wiki.soylentnews.org/wiki/index.php/User:Crutchy#Git.2FGitHub

DISTRIBUTED WEB HOSTING CONCEPT

Posted by crutchy on Wednesday March 12 2014, @01:09PM (#180)
9 Comments
Digital Liberty

An idea that came to mind during talk about Soylent hosting on IRC today.
Thanks to Titanium, prospectacle, stderr, useless, swiss, FoobarBazbot and MrBluze for a lively discussion :-)

It started with:
[19:43] * crutchy wonders if a distributed service could be developed... divide the load, build in redundancy and if anyone's host goes down others will pick up the slack
Time is AEDT

The idea has been developed a little bit further since the IRC discussion.

General System
==============
- independent of DNS
- with a distributed model anyone can volunteer to host a node (no single person relied on to front hosting costs)
- system consists of a network of apache host nodes set up by volunteers willing to cover the costs of their host, and users connect to the web service using their web browser with the remote host selected by a launcher program

Host Node
=========
- not required to access web service (only for those who choose to offer to host)
- apache web server configured for web service (mysql, mod_perl, etc as required)
- must periodically execute a script (using crontab?) that requests nodelist from listed nodes and updates local nodelist as required (adds/removes based on some kind of agreement algorithm)
- must respond to nodelist requests from launchers, but can be isolated php/pl/etc script and need not be built into hosted service
- must contain scripts to synchronize data and site source code updates securely with other nodes as required (this will be the tricky bit)

Launcher
========
- user executes launcher to access web service
- no gui
- executable or source downloaded from trusted location (such as debian repository or github) along with nodelist containing one or more known host IP addresses
- purpose is to select a remote host node and open web browser pointed to selected remote host IP address
- before opening browser, a nodelist request is sent to every host in local nodelist, and local nodelist is updated in same way as server nodelist is updated (see above)
- possibly a simple settings file if required
- could be a bash script for Linux and a small Delphi or C program for Windows

On IRC there was concern expressed about security and verification of host nodes.
Since you're using a browser as a client (and all the security features that come with) and you're only receiving normal http responses (otherwise your browser would throw an error), there's only so much bad stuff a host node can do.
Worst case scenario might be that it redirects to goat.cx or some site with driveby downloads (which most browsers will block anyway).
If required a trusted network of host nodes could be formed using signed certificates (perhaps using OpenSSL).

Nodelists may not be that big since there isn't likely to be a huge number of hosts for the same service (such as SoylentNews) but if need be the list could be gzipped. As mentioned earlier, the tricky bit will be synchronizing website data and service application source code, but I don't think it is an insurmountable challenge.

edit: data could be distributed, but would need to be synchronized on all host nodes (the tricky bit mentioned above)

edit: thinking about data synchronizing... would either require modification of the service application to execute a script when data is changed (and script would do the work of sending data to other hosts) or a shell script with a loop that checks for changes to data file timestamps and if change is detected send data files to other hosts. for max efficiency it would be ideal just to post a single mysql insert/modify query whenever data changes, but that would require integration into the main application (slashcode in Soylent's case). you don't want to be sending entire database files around the place whenever there is a change. a good place to start might be to host the data on one or two high performance 'supernodes' until an improved synch system can be developed.

Someone bought http://www.li694-22.org/ :D

Posted by Yog-Yogguth on Tuesday March 11 2014, @12:36PM (#174)
10 Comments
Soylent

As many might know SoylentNews resides on http://li694-22.members.linode.com/¹ and because of this some people were talking and joking about using li694-22 as a new name. It's a cool name, I was tempted myself! Perhaps an even "weirder" inside joke than http//:/..org :)

No need to be tempted any more; a Mr. Watt (not me!) of Washington bought it and pointed it at SoylentNews¹ :)

¹ naturally your cookies are in different jars

Edit: just to practice safe surfing don't log in through redirection or move your cookies manually or anything like that. Not that I would think anything bad would happen in this case but one would never know until it was too late (maybe Mr. Watt suddenly develops an appetite for collecting low UID accounts).

I'm gone

Posted by Barrabas on Monday March 10 2014, @07:46PM (#171)
11 Comments
Soylent

The domains are sold, the linode account is transferred, it looks like I'm out of here. This was a bad action to take, but the purpose was to get me out fast. In that regard it worked very well.

I could have stayed with the project and remained positive and upbeat were it not for the constant meanness shown by members of the staff.

Keep this in mind the next time you contemplate a palace revolt. Putting the dirty laundry out for everyone to see is hurtful and disruptive.

I wish everyone the best of luck in the new adventure.

Fuck beta!