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.
On IRC (in #Soylent), MrBluze and I have been discussing how to make a better messaging system. You would need to be able to easily send to individuals or groups, have messages either public or private, be able to verify that the message came from who it claims to be from (and someone who's a contact on your list), and all without relying on specific server software or a specific hosting company).
So below is a very basic proof of concept that does the following:
- Creates two identities (a sender and recipient).
- Gives them each a public and private key
- Creates a message that the recipient can verify is:
- Intended for, and only readable by the recipient.
- Created by the sender, and not just someone using their name.
- Formats the result in plain text (base64 encoded) so it's easy to transmit.
This means the message itself could be send via any text medium, public or private, as only the intended people will be able to read its contents and they'll know who sent it based on the message itself.
It's all very basic and preliminary but I had to figure out a few things about how to use openssl and hashes properly, so it may be instructive to other people interested in this kind of thing.
I'll get around to adding more comments at some point.
<?php
function encrypt_longer_string_public_key($source_string, $key, $chunk_length=100,$delimiter = "...")
{
$source_array = str_split($source_string, $chunk_length);
$result_string = "";foreach ($source_array as $source_chunk)
{
$encrypted_chunk = "";
openssl_public_encrypt($source_chunk, $encrypted_chunk, $key);
if ($result_string != "") $result_string.=$delimiter;
$result_string.= base64_encode($encrypted_chunk);
}
return $result_string;
}function encrypt_longer_string_private_key($source_string, $key, $chunk_length=100,$delimiter = "...")
{
$source_array = str_split($source_string, $chunk_length);
$result_string = "";
foreach ($source_array as $source_chunk)
{
$encrypted_chunk = "";
openssl_private_encrypt($source_chunk, $encrypted_chunk, $key);
if ($result_string != "") $result_string.=$delimiter;
$result_string.= base64_encode($encrypted_chunk);
}
return $result_string;
}function decrypt_longer_string_private_key($encrypted_string, $key, $delimiter="...")
{
$parts = explode($delimiter, $encrypted_string);
$number_of_parts = count($parts);
$result_string = "";
foreach ($parts as $one_part)
{
$one_part = base64_decode($one_part);
openssl_private_decrypt($one_part, $decrypted_part, $key);
$result_string.=$decrypted_part;
}
return $result_string;
}function decrypt_longer_string_public_key($encrypted_string, $key, $delimiter="...")
{
$parts = explode($delimiter, $encrypted_string);
$number_of_parts = count($parts);
$result_string = "";
foreach ($parts as $one_part)
{
$one_part = base64_decode($one_part);
openssl_public_decrypt($one_part, $decrypted_part, $key);
$result_string.=$decrypted_part;
}
return $result_string;
}function verify_hashed_string($string_with_hash, $hash_algorithm = "sha256")
{
$extracted_hash = substr($string_with_hash, -64);
$extracted_text = substr($string_with_hash, 0, -64);
$calculated_hash = hash($hash_algorithm, $extracted_text);
if ($calculated_hash == $extracted_hash) return $extracted_text;
else return false;}
// 1) Create a new key:
putenv("OPENSSL_CONF=c:\\wamp\\www\\nospamplease\\openssl.cnf");if (file_exists(getenv('OPENSSL_CONF'))) print "config file exists<br><Br>";
$config_args = array(
'config' => getenv('OPENSSL_CONF'));$sender_key = openssl_pkey_new($config_args);
$recipient_key = openssl_pkey_new($config_args);// 2) Extract the private key string.
print "sender key is "; var_dump($sender_key); print "<br><br>";
print "recipient key is "; var_dump($recipient_key); print "<br><br>";openssl_pkey_export($sender_key, $sender_private_key, NULL, $config_args);
openssl_pkey_export($recipient_key, $recipient_private_key, NULL, $config_args);// 3) Get the public key.
$key_details = openssl_pkey_get_details($sender_key);
$sender_public_key = $key_details["key"];$key_details = openssl_pkey_get_details($recipient_key);
$recipient_public_key = $key_details["key"];// 4) Display the keys. The hash of the public key could be used as a "to" identifier.
print "Sender Private Key: $sender_private_key<br><br>
Sender Public Key: $sender_public_key<BR><BR>";
print "<hr>";
print "Recipient: Private Key: $recipient_private_key<br><br>
Recipient Public Key: $recipient_public_key<BR><BR>";// Show some text before and after encryption and decryption
$original_text = "This is totally a secret message";// Add a checksum to the end.
$inner_message_hash = hash("sha256", $original_text);
$hashed_inner_string = $original_text.$inner_message_hash;// Encrypt the message with senders private key.
$inner_encrypted = encrypt_longer_string_private_key($hashed_inner_string, $sender_private_key);// Add a checksum to the end of the encrypted messaged, after a base64_encode of it.
$outer_message_hash = hash("sha256", $inner_encrypted);$hashed_outer_string = $inner_encrypted.$outer_message_hash;
$outer_encrypted = encrypt_longer_string_public_key($hashed_outer_string, $recipient_public_key);
//$outer_encrypted_as_string = base64_encode($outer_encrypted);print "<br>Original message:<br>$original_text<br>";
print "<br>Hashed inner string:<br>$hashed_inner_string<br>";
print "<br>Inner string encrypte:<br>$inner_encrypted<br>";
print "<br>Outer string (inner string encrypted + hash of encrypted string)<br>$hashed_outer_string<br>";
print "<br>Outer string encrypted:<br>$outer_encrypted<br><br>";// Now go the other way, decrypt it and show the decrypted message. Verify each step.
$outer_decrypted = decrypt_longer_string_private_key($outer_encrypted, $recipient_private_key);
$outer_decrypted = verify_hashed_string($outer_decrypted);if ($outer_decrypted) print "outer decrypted is : ".$outer_decrypted."<br><br>";
else {print "couldn't verify outer decryption";return;}$inner_decrypted = decrypt_longer_string_public_key($outer_decrypted, $sender_public_key);
$inner_decrypted = verify_hashed_string($inner_decrypted);
if ($inner_decrypted) print "Inner decrypted is: $inner_decrypted";
else {print "couldn't verify inner decrypted"; return;}?>
I've been working harder since I retired than I did working. Maybe it's because it's something I want. I've spent the last week proofreading. I found that typos and other errors are far easier for me to find in a printed book than on a screen.
I finished yesterday, updated and uploaded the file and ordered a new copy. Still having writer's block with Mars, Ho! (which is only 20% done) I checked Amazon and Barnes to see if they had Nobots available. Not yet.
Fifteen years ago when I had the Springfield Fragfest I had a terrible plagiarism problem. Folks weren't just infringing my copyright, they were posting my own work under their name. Not a week would go by that I didn't have to issue a DMCA takedown notice to someone, usually a university (a different one each time) where a student was plagiarizing my work. So I googled for pages using Nobots in an infringing way.
I publish under the noncommercial GPL license. All I demand is that it's non-commercial and I get credit.
I ran across this German site. I was taken aback at first... DMCA doesn't apply to Germans. Then I realized they were displaying mcgrewbooks.com in a frame!
I don't see how it could harm me and do see how it might actually sell a book or two so I'm not going to hassle them.
I wish I'd learned German rather than Spanish.
The torrent has ended. We lost Crewman Willikers in the wash. He had tied himself to the helm, and tried to keep course. We lost the wheel too; but the carpenter had a spare; and was able to patch it up. On the other hand he's not so sure of the patch to the hull, and wants us to find port. The sails will need patching, but for the most part the ship is sound.
The navigator says we're more than 200 off course; but the damn man wont provide any units. Could be parsecs for all I know. or Milliliters. or Pascals. bastard.
where's the damn grog?
Over the decades the race between size of data files and hard drives has been a steadily decreasing margin. I well remember my first HD, 200 megabytes, which was enough to store 250 Amiga floppy disks. Over the years processors and I/O throughput have increased to the point where Video is now the dominant type of file, such that my pc has multiple 2TB drives and I have to manage my storage carefully. Long gone is the casual ability to back up on floppies, then CD's, then DVD's and even BluRay's are now impractical. Putting aside backups, when are we going to get the next paradigm shifting technology in storage? This link suggests things do not look good:
http://datascienceassn.org/content/peak-hard-drive
If I could afford a half dozen 6TB drives I would be set for a few more years, however the trend is downwards.
I received and article rejection from the SoylentNews Editorial Staff with the following letter:
***********************
Hi,
Just wanted to let you know that we did reject your submission:
http://soylentnews.org/submit.pl?op=viewsub&subid=1081
The reason is that this is pseudoscience in the vein of bigfoot, lochness monster, etc. It's the scientific community's consensus that the chubacabras are simply a K9 (usually coyotee) with some sort of parasite (like severe mange).
http://en.wikipedia.org/wiki/Chupacabra "Sightings in northern Mexico and the southern United States have been verified ascanids afflicted bymange .^[2] Biologists and wildlife management officials view the chupacabra as acontemporary legend "
http://www.livescience.com/24036-chupacabra-facts.html
Have a good one.
****************************
The Editor's name was withheld to protect the editorial failings [unlike some people I don't do public "Name and Shame" like some of the other SoyGoys around here].
Note that I had been expecting the rejection [when something stays in the queue for 10 days its pretty evident that someone does not like the content].
There is only two problems with this rejection- The item I submitted was a "News" item not as a "Science" item. The fact is that someone found something that does not look like a dog nor act like one... The above editorial note above FAILS as a legitimate rejection because all of the sources listed are either:
A) Non-peer-reviewed -- Wikipedia is widely known to be not a vetted source of science or scientific research. -- Wikipedia is not Encyclopedia Britannica... and citing Wikipedia as a source of verified "science" should make any real scientist or News editor squirm.
B) LiveScience posts non-science / pseudo-science / religion as "factual science" for example see: Easter Science, Jesus Christ the Man, and Who is the Antichrist? All of these LiveScience articles are presented as "science" but when examined as Science they all fail as Science. They are feel good Christianity passed off as science. Science is not Christianity...
So why do I have a problem with the rejection? Simple if you are going to reject on the basis of "Pseudo-Science" then the links used to reject the article should in no way be attached to information sources which are not either peer reviewed or carry other pseudo-science as science stories.
One more thing Live Science did carry as story about Texas 'Chupacabra' Turns Out to Be Imposter with a byline by Benjamin Radford. Please note that Mr Radford has a Bachelor's in Psychology and a Master's in Education. Somehow his expert opinion seems to be missing a qualifying degree in biology or related biological science.
He is obviously not talking Science but Skeptical Pseudo-Science especially when he says "So, is this animal the elusive chupacabra? It's clear that it's not, because video of the creature broadcast on KAVU clearly shows the Ratcliffe chupacabra doesn't have the anatomical mouth features that would allow it to suck blood, from goats or anything else. Like several other "chupacabras" found in Texas and elsewhere in recent years, a simple look at the mouth demonstrates that it is physically impossible for the animals to suck blood. The mouth and jaw structures of raccoons, dogs and coyotes prevent them from creating a seal around their victims, and, therefore, physically prevents them from sucking the blood out of goats or anything else." So it isn't a chupacabras because it isn't a vampire???? This piece of crap opinion is presented as SCIENCE???? Some one might want to let Mr. Radford know that real Science does not need to do Satire [and do it so poorly as he does] to accomplish its purpose. In fact it is people like Mr. Radford that spout trash science who stand in the way of Real Science.
The Skeptical Mr. Radford goes on "The most likely answer is that it's a raccoon. Animals that have lost most or all of their hair can be very difficult to identify correctly, for the simple reason that people are not used to seeing the animals without hair."
Um... "most likely answer"??? What? He does not know what it is? First you say it can't be a Cupacabra because it does not suck blood and then cannot identify the animal? THAT is science?????? If Mr. Radford was actually going to do "science" one would think that DNA evidence would be the best way to prove what the animal's species is. Or is DNA too scientific? Apparently "denial is science."
I'm sorry but Dear editorial staff you suck at Science and your sources of "plausible denial" suck even more. It appears you have fallen for the Pseudo-Religion called "Skepticism". Skepticism is not Science and should not be used. One can only wonder what the SoylentNews Editors would make of any kind of articles related to climate change.
I've hardly logged on to the internet at all this past week, too busy correcting a mistake software houses frequently do: Trying to rush a project out the door. The fact is, I'm tired of The Paxil Diaries, but I don't want to ship a flawed piece of crap.
The first copy had a messed up cover; my printer's "cover generation wizard" has an interface almost as bad as GIMP. I fixed it and ordered a corrected copy, and a day later as I was converting the .odt to .html I discovered that some of the chapter numbers were wrong and there were no page numbers. I fixed it, resubmitted it and thought "This time it'll be right."
Number three showed up bright and early Thursday morning. I started going over it with a fine toothed comb. Almost halfway through and I started to think I'd be able to release it. The weather got really nice so I decided to read it in Felber's beer garden.
I discovered I was far better at proofreading when I've had a few beers than sober. When I'm sober what the words are saying distracts me from the words themselves, and I read too fast and miss errors.
It was full of errors, many of them whoppers. I marked them drinking, and finished correcting this morning while sober and sent for copy #4. It may be available in a couple of weeks depending on if I find more errors when it comes. I'll upload the book's HTML and PDF versions as soon as I decide I can release it.
Meanwhile, I can get back to Mars, Ho! this week.
..are some of the weirdest.
In the early days of Journalism folks like Mark Twain and Lyin' Jim Towsend told some woppers to get newspapers sold in the Boom towns of California and Nevada but they never felt the need to get down and dirty.
I happened to stumble across this one: The Pubic Hair Preferences of the American Woman.
My first thought was "really???" Then... "Gross.".... then "Really????" The only rational explanation I can think of is that "538" is trying to get momentum for their shiny new web site.
Is this kind of "journalism" needed? Is there some kind of journalistic "ecological niche" this kind of story fills? What is even more astounding is that the study which provided the data for the article was done at the University of Texas and "Federal support for this study was provided by the Eunice Kennedy Shriver National Institute of Child Health & Human Development". Is this kind of science needed? Did we really need to know?
One last quirkish thing. The official title of the study was: "Prevalence and correlates of pubic hair grooming among low-income Hispanic, Black, and White women". Now a number questions come to mind: Why were *only* low income woman in this study? Was it because no high income women were available? Is their some kind of unspoken "moralistic" statement here or just a couple of Gynecologists getting cheap 'jollies'? Was there an actual scientific value in the study or was it just a way to spend some money?
Portions of this were originally posted HERE I did not re insert the links so go read the original for the reference links here on soylent.org
T am reposting this because My words as a "minority" seems to have gotten lost in the noise in the original comment post.
I am Jewish. I chose to be Jewish. When I was asked why I wanted to be Jewish[1] I explained it:
"When I was small I was kicked and beat, and spit on, sworn at and picked last for kick-ball. I spent my whole life being a loner and being hated or disliked for good or bad reasons... most of the reasons I was bullied was because I was an easy target. So why do I want to be Jewish?" I replied. "I won't be alone any more."
So I'm Jewish right? No according to some of the Orthodox Jews. I'm not Jewish enough for them but I certainly am Jewish enough to feel the wrong end of other people's intolerance... or other people's ignorance.
There has been a long ongoing debate about where to draw the line on "intolerance", "hate speech", "bigotry", or "denial of history". My simple line is this: "Hate Speech is still free speech. The trouble comes when people begin to act on their hate speech. If they act on their words then they should be considered anathema..." Saying "I hate you" with words is one thing. Saying hate with a burning cross or a loaded gun or a rope is another. The speech might be incitement but are war games incitement?
The poster who was "singled out" by this post [that's a kind of hate speech too] had some "informed" words to about Jews. I clarified his error. 'Nuf said and no remarks flew back and forth... Later when I posted a journal saying maybe I should not comment on "political" stuff here any more this poser singled out was the first to step forward and say he didn't want me to be silent.
I've had words from others here like "Hey Jew Boy...!" [soylentnews.org] which were much closer to the Good All Amerikan Skin Headed Boy". I didn't piss my pants and run for the wings. I told a joke instead... which got up-modded. Hate speech from ACs is more to be feared than from someone who is willing to use their own identity to say unpopular things.
So from my experience I would rather have Ethanol Fueled say what he feels than someone play the anonymous coward with true and ominous hate speech.
Now as for the original poser-- I DO NOT like what you have done here. Who appointed you the judge and jury? You have made "Front Page" hate speech without actually saying "So and So is a immoral and evil scum sucking friend of all of the bastards that don't believe like "we" do so let's put him in the public square, shame him, mark him as an EVIL ONE..."
Uh, guess what? That is they way ALL hateful pogroms begin-- singling out someone's because of some alleged moral or ethical superiority. One can easily see this in the words of a recent American President, no, not Obama, George W. Bush [wikipedia.org]. Does he happen to be one of your friends? Has Bush's words made the world a better place to live. Sure. The Iraqi's are good friends and customers of the Iranians. The Afghans and the Pakistanis hate the U.S.
If we are going to paint people with scarlet letters , are we truly morally superior? The empirical answer is-- no.
America is a country built in many ways upon Puritan values... you know the values that gave us the Salem Witch Trials and Nathaniel Hawthorn's "The Scarlet Letter". We are still pushing the Puritan agenda. So we paint people with labels rather than addressing the issues they raise or the ignorance they display. We allow Religion to teach hate and narrow non-accepting moral values and allow morally ambiguous actions by Corporations and the Government... and then call anyone we disagree with a hate-monger or intolerant. Would you become one of these people you hate if you became the victim of some petty criminal regardless of color who takes a liking to your possessions or your body and acts on their desire?
Understand something criminal behavior is criminal behavior regardless of race, creed, color, or political affiliation... I'm sorry but painting labels and scarlet letters do not resolve the issues that create the criminal behavior.
One man's intolerance is another man's daily norm and another's belly laugh.
The person in question has a right to his opinions how ever disagreeable they seem.
[1] Unlike some other religions there are specific rules about Jewish converts. One of the rules outlined in the Talmud is the requirement to ask the proposed convert: "Do you not know we are a people that has been brutalized and downtrodden and unpopular, and our ways are very different from the ways of the rest of the world?"
As I've stated several times, cheap IP cameras are a little flaky. So even if you calculate the appropriate number of pictures to take in a 24-hour period, midnight will inevitably arrive and the script will still have a handful or two of pictures left to take.
So first we need to kill off the previous day's job. Here's the way to do that from cron:
00 00 * * * /bin/ps -o pid,args -U fliptop | /bin/grep grab_pic_tv-ip551wi.pl | /bin/grep -v grep | /usr/bin/xargs /bin/kill -15
Substitute the username your scripts run under for the -U switch and the name of your perl script in the 1st grep. Basically, this command takes all process that run under a particular user, greps out just the one process your script runs as, throws out any instances of the grep statement itself that may make their way into the results, then kills it w/ signal 15.
Next, at one minute after midnight, we start the next instance of the script for the new day:
01 00 * * * /bin/nice -n 19 /usr/bin/perl /home/fliptop/tv-ip551wi/grab_pic_tv-ip551wi.pl
Again, substitute the appropriate script location and name. I usually run these things nicely so they don't interfere too badly w/ other processes that run from time to time.
All that's left is to create the movie from the previous day's images:
03 02 * * * /bin/nice -n 19 /usr/bin/perl /home/fliptop/tv-ip551wi/ffmpeg.pl
As before, substitute the proper location and script name. You can run this at any time after midnight.
As you can imagine, watching surveillance video can be pretty boring since most of the time there's nothing noteworthy happening. However, once in a while you can see some damn interesting weather. One day last May I was reviewing some footage and thought to myself, "that would probably look pretty cool if it was edited a little w/ some Vivaldi."
Coming next, cleaning up your images.