put movement of active unit into a function
created <init> and <quit> reserved aliases in exec (irc.php), which i'll eventually use for loading/saving game data (in addition to timed saves).
used cmd.php (attached to * alias which runs on every received line of data) to fire commands on a 330 numeric event (whois/logged in as) to make startup a bit easier - automatically sets player alias lock to "civ" (in game channel only) and outputs a status command, so that when a player joins a game channel, they can start moving their active unit pretty much straight away (after a 2 or so second delay in processing login script).
IRCiv wiki page created: http://wiki.soylentnews.org/wiki/IRCiv
latest source pushed to github: https://github.com/crutchy-/test
next up... adding a settler unit and getting the active unit cycle function working
IRCiv is a little game (and game engine of sorts) for building stuff like in "Civilization"-branded games.
Currently it piggybacks as a couple of scripts for the exec bot. Refer to the wiki for more info on exec: http://wiki.soylentnews.org/wiki/IRC:exec
Implemented some basic unit movement last night. Can use "up" or "u" action on the active unit (along with equivalents in the 3 other directions).
The game is being gradually developed/tested most nights (Australian time) in the #civ channel of Soylent IRC. Feel free to join, but be aware that you may get pinged by the bot a fair bit (you're always free to duck in and out whenever you like of course).
Other stuff that has been implemented already:
- auto-login on join/logout on part
- logins based on nickserv account name (using whois), so means that players must be registered with nickserve
- supports nick changes
- map generator has been developed (random landmasses based on a couple of parameters)
- map image dump
- map text file dump
- player settings and flags system
- player active unit status output to either game channel or private message (based on "public_status" flag)
Currently development is mainly in PHP, but using the exec bot system, game features/modules can be developed in any language.
Each command runs as a separate script in its own process instance, but can easily communicate with IRC and access persistent game data.
The project is open-source (GPL2) and can be found here: https://github.com/crutchy-/test
Feel free to fork or pilfer, but please share your changes/derivatives.
Anyone interested in contributing to the current project, look for crutchy in #soylent or #civ on IRC.
I discover that Slash's Template system is based off of Template-Toolkit v2.07. Therefor, a lot of useful information can be gained by reading that documentation.
I also discovered some old yet interesting discussions buried in the TT mailing list's archives. It wasn't easy to find the discussions, so I will post the links here.
Disclaimer: I'm not an expert, in fact I'm brand new to the Slash code-base. This information could be wrong or missing important parts. If you happen to find any mistakes or have any further insight to add, please comment.
Note about Terminology: I am not a PERL programmer. I read an O'Reilly book on the language and interpreter around 10 years ago, so you will have to excuse my Terminology, which will probably resemble Java more than PERL (For example, I don't think there technically is a "class" in Perl 5, however I still use this term).
Slash::Display
The Slash::Display class --essentially-- represents a customized instance of the Template module (Template-Toolkit). This custom instance encapsulates the full Slash Template system. Similar in focus to the original Template-Toolkit, from what I can understand the main focus of Slash's Template system is the ability to store template data (The "Providers") in Slash's MySQL database.
In Display.pm, the slashDisplay method calls get_template, which instantiates the Template object defined in the Templates module. The Slash::Display::Provider, Slash::Display::Plugins and Slash::Display::Directive objects are sent as arguments to the base Template class's constructor method (new).
The instance of Slash::Display::Provider (Along with any Slash::Display::Plugin objects it may have) is "compiled" (Unless already "compiled"/cached) and then run. This is all done using either the process method (Display.pm, line 218) or with the input method (Display.pm, line 215). Both of these methods are inherited from the base Template class (Display.pm, line 47).
Slash::Display::Provider
The Slash::Display::Provider class defines an object to represent (model) the data of a template that's stored in the Slash database.
Slash::Display::Provider is based on TT's Template::Provider class. Slash::Display::Provider inherits ("Subclasses") Template::Provider and then, --among other things-- overrides the fetch, load and refresh methods to add the ability of storing and loading templates from a Database (As Slashcode does.)
Note:On the same line that creates an instance of the base Template object, the Slash::Display::Provider object is instantiated (Display.pm, line 392) and passed in to the base Template object as an argument.
Slash::Display::Plugin
The Slash::Display::Plugin class defines an object to model a Template Plugin stored in a Database. Template Plugins --I think-- extend the functionality of Slash to support a particular feature or features that the template adds. Is this right? It is different from the primary Slash Plugin system, which I have yet to explore..
Slash::Display::Plugin is based on TT's Template::Plugins class. Slash::Display::Plugin inherits (Subclasses) and extends Template::Plugins and then, --among other things-- overrides the new ("Constructor", which instantiates an object) method and adds the display method. The display method displays output from the Plugin followed by a callback to the slashDisplay method, which displays output from the template.
Slash::Display::Directive
The Slash::Display::Directive class inherits from the base Template::Directive class. The purpose of this class seems to be to act as a container to encapsulate data ("Directives") used to control and configure the Template Parser.
The Slash::Display::Directive object is defined by an inner-class of the Slash::Display::Provider class (Provider.pm, line 201).
In this week's poll on Pipedot I ask you to rank popular websites using the Borda Count voting method. In other words, how much do you trust these sites to maintain your data and your online privacy.
Instructions:
Rank any number of options in your order of preference.
Notes:
This marks the 3rd voting method supported. Approval Voting was added last month.
Hi,
So, my evening/night started like any other until I started having several nosebleeds which all occurred within one or two hours or so not to mention the headache, so like any responsible geek I decided to phone my Doctor, fortunately, he was still awake and told me to go to the hospital... (what I got told there isn't important to this journal entry)
Anyway, so when I came home the IRC server was *seemingly* down, in fact, my entire server was *seemingly* down. After contacting my ISP, I had to go through a few hoops - and as it turns out, it was a faulty switch (you'd think, they would at least be monitoring their own switches right?). They replaced it and it's all back up. Incidentally, I was going to configure Carbon (which was going to be another IRC server) last night but the hospital thing came up.
So all in all, my night sucked big time.
Hopefully, not to many of you were inconvenienced by the downtime, perhaps some of you even managed to see the sun, or at the very least, felt the wind.
Update: webchat was still down, sorry about that.
A $1,499 supercomputer on a card? That's what I thought when reading El Reg's report of AMD's Radeon R9 295X2 graphics card which is rated at 11.5 TFlop/s(*). It is water-cooled, contains 5632 stream processors, has 8 GB of DDR5 RAM, and runs at 1018MHz.
AMD's announcement claims it's "the world's fastest, period". The $1,499 MSRP compares favorably to the $2,999 NVidia GTX Titan Z which is rated at 8 TFlop/s.
From a quick skim of the reviews (at: Hard OCP, Hot Hardware, and Tom's Hardware), it appears AMD has some work to do on its drivers to get the most out of this hardware. The twice-as-expensive NVidia Titan in many cases outperformed it (especially at lower resolutions). At higher resolutions (3840x2160 and 5760x1200) the R9 295x2 really started to shine.
For comparison, consider that this 500 watt, $1,499 card is rated better than the world's fastest supercomputer listed in the top 500 list of June 2001.
(*) Trillion FLoating-point OPerations per Second.
So my first submission ever was accepted (Including /.) and posted yesterday. Unfortunately, all of the comments were lambasting the actual security of the tool I talked about, being from the DOD, almost everyone mentioned that it probably has backdoors strewn about in every crevice of the OS. They are probably right.
I guess I really just wanted to help SN to have more content without just copying some news article that people have already seen. I suppose I should stick to something I actually know, and try to find something in the astronomy/science field. Oh well, now everyone probably thinks I am a DOD/NSA shill.
BEST FIRST SUBMISSION EVER.
As the title says. An injury two days ago apparently requires surgery. I will be on hiatus for as long as I need to be.
Mattie_p
EDIT: surgery is complete, she is in recovery right now. She and I are both pretty tired right now. I'm home to care for my son and my wife took over at the hospital. I'll try to keep everyone posted but there is a lot I don't know at this point.
https://github.com/crutchy-/test/blob/master/karma_published.php
bacon+
(only single +/- to differentiate from bender)
~karma bacon
~rainbow pretty text
etc
todo: quotes
Don't use a skillet for your bacon, use your oven! In my case 225 degrees Celsius for about 10 minutes results in perfectly crisp bacon simmering in its own fat.
I use a sheet pan in the middle of the oven, two layers of baking paper under the bacon, and leave room for some half-baked small baguettes that I add when the remaining time is right.
Take it all out, slice the baguettes, put on bacon, put on cheese (maybe some cheddar slices) = simple and quick filling hot bacon & cheese sandwich.
Next time I do this I'll try wrapping the paper around the bacon to minimize any grease splatter. I might have to add a bit more baking time to get it as crisp since it's loosely covered.
Ovens are also great for making super-crisp sausages but I've only tried it with the thick kind that are about 3cm or 1 and 1/2 inches across: bake them until they rupture! Exploded sausages taste a lot better but be careful as they're really hot.