Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


14.12 Update

Posted by The Mighty Buzzard on Wednesday November 26 2014, @08:23PM (#830)
6 Comments
Soylent

The long and short of it is, there won't be one. We're pushing it until January due to me and PJ being occupied too much with holiday and Life stuff.

What you can look forward to:

  • Moderation Rework

Not a final version and we haven't touched meta-moderation yet but this will cut down on the echo chamber effect, mod bombing, and lay some groundwork for combating spam as well.

  • Input vs Output Wackiness

Currently if you put html entities in and hit preview they get transformed into literal characters. There's also wackiness if you try to put double quotes in a submission title. I hate this, you hate this, and it needed to stop so most of the code for it is already done and being tested on dev.

  • RSS/Atom Feeds Moving to SSL

There is really no reason to have http links in the rss feed rather than https links, so they're changing. I'm also doing my best to get them to encode only the necessary characters and display properly but it seems like no two readers display the same.

  • A Couple New Themes

Occasionally I get bored and do up a theme instead of actually working. This time around we have the VT100 and the OMG PWNIES themes. These are actually pretty easy to do. Feel free to mod and submit your own. All it takes is a custom stylesheet if you're okay with reusing existing favicons/logos.

  • Support for Additional Tags

We're adding standard support for sub/sup/abbr/strike tags. We're also adding support for the custom tags sarc/sarcasm and two forms of a "user" tag.

  • Additional Minor Bug Fixes

Bunch of minor bugs, some of which you would have never seen because they were on admin pages.

I think that's all but I'm not sure what the last one that went into our point release after the 14.12 update was.

Comment Inbox

Posted by Marand on Monday November 17 2014, @11:10PM (#809)
4 Comments
/dev/random

I don't know of a better way to send comments directly to a user, so I'm just going to leave this journal entry as an inbox of sorts in case anybody wants to get my attention for some reason.

exec live scripts

Posted by crutchy on Friday November 14 2014, @11:43AM (#803)
0 Comments
Code

the "~x" alias allows a bot operator to create and manage scripts from within IRC (dubbed "live scripts")

scripts created using this alias are stored in a bucket by the bot instead of a file

the handler uses php's eval to run live scripts

to prevent anyone from executing arbitrary commands on the bot host, a whois command is issued to verify that the NickServ account of the user of the ~x alias is the bot operator (by settling the userlist parameter of the alias definition line to "@")

the general form of the command is:

~x %action% [%param%] [%code%]

in a nutshell the possible actions and params are:
"global on|off" (enables or disables all live scripts)
"kill" (a shorcut for disabling all live scripts)
"enable %script-name%" (enables an individual live script)
"disable %script-name%" (disables an individual live script)
"delete-script %script-name%" (deletes a live script from memory)
"open %script-name%" (opens a live script for editing in the active channel)
"close" (closes the currently open live script in the active channel)
"code" (outputs a line-numbered code listing of the currently open live script in the active channel)
"list" (outputs a listing of available live scripts, and highlights enabled scripts)
"replace [L]%line-number% %old-code%|%new-code%" (replaces a line of code in the currently open live script)
"delete-line [L]%line-number%" (deletes a line of code in the currently open live script)
"insert [L]%line-number% %code%" (inserts a line of code in the currently open live script)
"add %code%" (adds a line of code to the currently open live script)

import and export (from/to file) actions are also proposed but not yet implemented.

live scripts have access to common lib functions used by other scripts, and also have direct access to $nick, $dest (channel), $trailing. the privmsg lib function doesn't work for live scripts as the live script handler is triggered internally by the bot using a registered privmsg event handler, so to privmsg the channel that the sender ($nick) is in you simply call pm($dest,"message) instead.

when a new live script is created, it must be enabled before it will run, but once enabled any changes will come into affect immediately.

whilst the code is currently limited to php, it could potentially be adapted to execute code in other languages using their command-line interpreters. it also doesn't have to be limited to code. it could potentially be used to collaborate on lines of non-executing text (such as for collaborative editing of SN submissions). with some tweaks it could be possible to collaborate on code as well, with other users being able to add/edit/delete lines but requiring the operator to re-enable the script for changes to come into effect.

ps: exec also now supports init: in-script directives, similar to startup: and exec: directives, which will increase self-containment of scripts further.

--
https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/scripting.php
http://sylnt.us/exec
http://sylnt.us/execsrc

Gather 'round children...

Posted by Snow on Thursday November 13 2014, @06:30PM (#800)
15 Comments
/dev/random

In every person's life, they have good times and not-so-good times. It's easy to take the good times for granted. When times are good, there is no reason to think why - it just is. Eventually, the pendilum will swing back in the other direction and that, my friends, is where I am today.

It's been a tough couple months for me. I'm 31, recently married, no kids. My wife and I lived together for over 10 years before getting married. Needless to say, we met rather young. She is an amazing woman -- beautiful, smart, and caring. She is the only woman I could imagine living my life with. As I mentioned, we met rather young, and because of that, I never had a chance to fool around with other women. I thought that I could live with that, but over the last 6 months or so (and talk of having a baby), the reality has hit home, and I don't think I want to life my entire life only being with 3 women. So what do you do? I have a wife that I love very much and want to spend my life with, but a burning need to experience the world.

***

I have a good job that allows me to live comfortably, but it is killing me. Most days I only do one or two hours of work, which sounds great until you actually have to live it for a couple months. It's really boring and unfufilling. I am by far the most technical and experienced person on the team, yet another person runs the team (It's complicated...). I don't get invited to meetings and because of that, mistakes get made and then I have to clean up the mess. I get no appreciation at all even though I pull rabbits out of my ass all the time - for what? It's just super stable... I can't imagine getting laid off or fired. That being said, my mood is getting the best of me and I've been really pissy and irritable lately. If it get's much worse, I might get fired.

***

How many of you are married? Women and men don't need sex in the same way. For a man, sex is very, very important. If I don't get sex, I get really depressed. It get's really old when I have to initate sex all the time. I get rejected often because she's 'too tired' or 'not in the mood'. It's humiliating and painful to be rejected so much, like a knife to the heart. It hardly seems worth even trying. I get 'intimate' with my computer more than my wife. I would guess I get sex about 5 times a month.

Last Tuesday, we had talked about sex in the evening, and then she took a bath (which usually means I'm getting lucky). When she crawled into bed, she says 'I'm so tired..." AKA 'No sex for you'. Ouch. Well another date with the computer then... The following day, I sent her a very well written article that explains how men need sex just like women need to talk. She understood the article and plans to do better. Last night she actually initated sex, it was amazing. I hope to get more of this...

***

I really do have an amazing wife, and we have a strong relationship. Over the summer I told her that I don't know if I can live my life without having sex with other women. I only get one life, and sex is so important to me. I'm not looking to screw anything with legs, but I'd like to bring my number from 3 to something like 10. I dropped this on her 3-4 months after we got married (Remember we have been living together for over 10 years, so it feels like we have been married for a long time...). I felt like a complete asshole, but I'm caught between a rock and a hard place. One one side I would never want to hurt my wife -- but on the other, I only get one chance at life, so I want to get everything out of it.

We talked about this a few more times over the next few months, and she agrees to allow me to date other women on the side. It felt like I had escaped from a trap. I try Tinder, and then gave up on that and opened an account on another dating website. I very stongly believe in honesty, so I put in my profile that I am married. I don't want to decieve anyone.

It's been a couple weeks now, and no good nibbles. I think I'm pretty good looking for a nerd (I'm thin, but tall) and I'm reasonably socialable. The lack of interest has really gotten be down even more though.

***

So, that's my life. Sometimes it helps just writing things down, so I hope this helps. I have a job that is unfufilling, an unfulfilling sex life (although my wife says she'll try now - which in itself is pretty sad), and constant rejection on dating sites. It's getting pretty tough to deal with. I hope things get better soon.

-- Snow

exec irc bot: script startup commands

Posted by crutchy on Tuesday November 11 2014, @01:39PM (#797)
0 Comments
Code

can now specify commands to run at startup inside scripts in a similar fashion to alias definitions

startup commands are read from one or more directives in the main exec file:

startup ./scripts

this uses the same (now more generalized) code as alias definitions; recursively searching files in the specified path for "startup:" directives (similar to "exec:" directives). like exec directives, startup directives must occur at the start of a line, so should be put in multi-line comment (below exec directive usually).

startup directives are stored until the bot identifies with NickServ, at which point the "<startup>" reserved alias is triggered followed by commands from startup directives run.

startup commands are like what you would type in IRC channels, but in this case they are intercepted by the bot and don't get transmitted to the IRC server. you can have any number of startup directive lines in a file.

example (php exec script):

/*
exec:~privmsg-internal|5|0|0|1||INTERNAL||0|php scripts/privmsg.php %%trailing%% %%nick%% %%dest%%
startup:~privmsg-internal register-events
*/

startup directives are good for triggering event registration handlers in the script, and pretty much makes a script self-contained (for now anyway).

--
http://sylnt.us/exec
http://sylnt.us/execsrc
commit for this feature: https://github.com/crutchy-/exec-irc-bot/commit/a3bb41c0d6eced1b6ec6e6573370f3db7129ccaa

My words to the universe.

Posted by Subsentient on Tuesday November 11 2014, @12:13PM (#795)
6 Comments
/dev/random

Warning: if you suffer from depression, don't read this. It might mess with your head. Not kidding.

This is probably the first time I've written to you, universe. I may have prayed to God or others, but I doubt I've spoken to you before.

I need to drop on my knees, and sob out my thanks to god for Prozac 60mg. I've suffered more than I imagine near anyone else can comprehend. It's such a sick, bent agony laced with petrifying fear, covered in 'my-universe-is-broken' sauce. The OCD I was dealt in 2011 is the most indescribable hell I can imagine. I can laugh at the atrocities I see on the news because I would have traded places for something as simple and benign as physical pain, the pain of four broken limbs or having my skin peeled off with a steak knife. Instead I was given 24-hour terror equivalent to being eaten alive by a monster. I wanted to die so bad during this. I wanted to die so badly.
I was alive for my family but even their need was getting to not be enough to justify my living in this carnival from hell.

So as you know I ended up in a crisis center in September, right in time for 9/11, and was put on several medications, none of which worked, and one (Invega, the only antipsychotic they tried), actually made it far worse. Then they gave me the Prozac. I knew that SSRIs needed to be a high dose to help OCD, so I bothered them until they raised it to 60mg.
It took the month and a half to start working they said it would. A little longer.

We both know I was not given the hand-washing or germ phobias with my OCD, I was given the horrible obsessive existential stuff, the really horrible painful questions that I'd obsess over until every fiber of my being believed them to be true. The kind of stuff that can blacken your sky and make you feel like you're falling into an infinite pit of pitch black tar. The stuff that makes you want to die, but be too afraid of what nightmare would await you if you did. The one the sufferers called Pure-O. I suppose I deserve some positive reward for living through this at all, or perhaps just an absence of punishment for a while, since if I wasn't wanted by family and friends, I'd be two years dead by now.

I'm writing this because I want to tell you what I need now. I hope you'll give it to me. As you know, the last few months, during my recovery, I've stopped all work, all projects, all programming and just played Warzone 2100 all day. I've gotten as good as I was before. I'm happy for the first time in years. I plan to start my work again soon, but I need some guarantees from you before I do so.

The first thing is, as an example, my famous gerbil jokes, such as 'fear the gerbils', no longer appeal to me, because I've had enough fear. Horror movies are no longer something I watch, I don't enjoy Halloween anymore, and although you know that historically I've preferred sad music when sad, now, I find myself playing uplifting songs in an attempt to drown out the memories. Christmas is probably forever ruined for me because of the onset of the OCD that time in 2011. Kinda a PTSD thing going on there.
Whenever I hear a christmas song, instant trip down memory lane from hell.
Fourth of July is ruined too thanks to my relapse in July this year.

I want to be surrounded by joy, by kindness, by peace, by good things. I have seen enough of the other side of the spectrum for this lifetime.

I want to be loved, and to love others, I want to have a fulfilling and useful purpose and still have time for myself.
I want to be followed by a hundred billion times more light than I ever was darkness.

The tagline at the bottom of the site today says "Today is the first day of the rest of the mess.", but I vehemently disagree. Today is the first day of the rest of my life, and it's going to be good now, because I deserve it. I've paid my dues. I'd just like your blessing for the good plan I've laid out, and your help in making it come to pass.

Sincerely, SubsentientneitnesbuS.

exec irc bot: included alias definitions

Posted by crutchy on Saturday November 08 2014, @12:16AM (#787)
0 Comments
Code

added an include feature when loading/rehashing the main exec file (https://github.com/crutchy-/exec-irc-bot/blob/master/exec.txt).

syntax is:

include %filename%

%filename% can be a path, which will recurse to include any readable files contained.

it can also be a relative path (to the main bot script, irc.php):

include ./scripts

when including a file, the bot will read the contents of the file and look for any line beginning with "exec:" and will treat whatever follows as an alias definition (exec line).
to use this feature in a script (without borking the script) you just enclose the line in a comment. the exec directive must be on its own line, so it won't work as an EOL comment.
this means an alias definition (exec line) can be stored in individual scripts in any language that supports multi-line comments.

example (from https://github.com/crutchy-/exec-irc-bot/blob/master/scripts/irciv/irciv.php):

/*
exec:~civ|30|0|0|1||||0|php scripts/irciv/irciv.php %%nick%% %%trailing%% %%dest%% %%start%% %%alias%% %%cmd%%
*/

if you create a new script, you can either add an include directive in the main exec file and issue a ~rehash command in irc, or if you already have a directory in the main exec file you can just issue a ~rehash after you save your script.

the aim of this feature is to enable scripts to become more self-contained.

anyway, thanks for reading and have a great weekend.

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

Soylent IRC voting system

Posted by crutchy on Sunday October 26 2014, @11:46AM (#757)
0 Comments
Code

A quick and dirty voting script has been developed for use in Soylent IRC.

Voting syntax for users identified with NickServ is:
~vote <poll_id> <option>

More info on how to use it can be found here:
http://sylnt.us/vote

--
http://sylnt.us/exec

Everything that has a beginning has an end

Posted by velex on Friday October 24 2014, @12:14AM (#751)
1 Comment
/dev/random

It was a dark and stormy night.

There was a sexual harasser on the loose.

Somebody who had been learning programming well told her mentor that she was a feminist.

A few hundred miles away there was a great guy who had dated over 20 different women that year alone and was rejected every time and was still a virgin. His married sister had sex on his couch with a man who was not her husband.

In the nearby city of Pine Rapids, Iowa, a frustrated trans woman reached her limit of reading about the drivel womyn-born-womyn publish about fields they don't understand. Maybe it was gamergate that made her crack, or maybe it was systemd.

In Derry, Maine, her estranged sister, who had begun living as a man, Maxfield Stanton, three years ago, was accused the day before yesterday of sexually assaulting a mutual friend of a man he had started to develop feelings for.

-=-

Don't worry. I'll tie this all together in scene 24.

I've scrambled my password and email on the green site. I had to use Chrome under Windows! Midori on BodhiLinux wouldn't work! Good riddance to that site.

I've made an account on the blue site just to reserve this username, but I can't figure out how to scramble it quite yet. Maybe I'm just too confused at life at the moment.

I'm now scrambling my password and email here.

It's not you; it's me.

This has been the year from hell, and it's not over yet.

Clearly my knowledge about feminism, or at least those who call themselves feminists, is about 15 years old. Some of it may still be true to a certain degree, but I feel I no longer know what the movement is and my comments earlier today were probably putting blame on the wrong people. Thus, I'm as guilty as the feminists of 15 years ago for what they did to me.

Given enough time, everything changes.

I may be returning, but not with this UID. You won't need to hear any more trans-this cis-that from me, hopefully. I understand that may no longer be an issue for the feminists, so it's no longer an issue for me.

Yet, I'm clearly triggered on a level that indicates PTSD just by the word feminism. I'll be seeking treatment. Things will change, one way or another. Either I end up in a gutter or I get well and go on to die when I'm 90. Either way, the cycle of death and rebirth continues, and afterwards I'll be somebody even more strange who won't even remember being here as gamers and male programmers come under increasing fire for all that we can guess are ulterior motives.

There's a new-age movement of the future for you: mediums who help people trawl through old message boards from the first quarter of the 21st century to attempt to find their previous life.

It's been great.

Goodbye

A rant about MISRA - the big problem with software

Posted by tonyPick on Tuesday October 14 2014, @07:27AM (#726)
0 Comments
Code

Minor disclaimer; wrote this about a year ago, and Google will have changed some of the details - you didn't used to get anything about MISRA at all from the initial searches

You see, MISRA is symptomatic of the big problem with software development.

Go to Google. Type in MISRA; you'll see references to Misra C, links to the homepage, we'll wander over there in a moment. So far so good.

Now type in "MISRA Evidence" - see any evidence MISRA works? You'll find [2], and we'll chase that in a second, but basically - Nope. Maybe it's just buried; throw in "MISRA Evidence language"; nothing on the early pages - if you go through you'll find a nice set of papers from Les Hatton on safe language subsets[0] which review MISRA itself effectively but no hard data as to the comparative usefulness, and in fact seems to come squarely down on the side of "was useless, is now actively harmful" [0a, 0b].

Now, how about "MISRA peer reviewed research"? Nope.
"MISRA language peer reviewed research"? Wait... Oh, it's a press release. No data or citations. An offer to maybe give me a white paper, if I send them my email address. Bzzzzt
"MISRA C peer reviewed research"? Citeseer? The same problems.

The MISRA site (http://www.misra.org.uk)? A lot of offers to sell me Official Specification Documents, Training Programs and Tools. But actual evidence that MISRA works? Citations to peer reviewed journals? Raw data? Not So much.

Now, by digging around you can find a couple of evaluations of MISRA as a coding guideline, and you can find some studies which imply something like MISRA might be a net win when combined with other techniques [1], but no direct cost/benefit to say "if you invest X on MISRA compliance, you will gain Y".

The persistent might go back to the MISRA bulletin boards where somebody asked directly if there was any study to back up the effectiveness of MISRA[2]: In addition to opinions (but no evidence), one posting pushed the idea that the companies using it aren't publishing results because they "are not research places" and "are busy" making software. Imagine for a moment if your local Hospital came out with that one?

"We're feeding them mercury. We don't know if it works, but these people are just busy getting better, and we don't have time to do research. And Mercury is Shiny!"

And this isn't some shiny new niche development idea; It's been in widespread use for over 15 *years* There should be volumes of hard data here, from direct studies across multiple industries to toolset impacts to literature reviews to raw data and meta analysis. We should be swamped with this stuff, not digging through the fifth page of Google or Citeseer and offering up our email addresses for something that's maybe vaguely relevant.

So here's a hypothesis; Studies with actual, real world, hard published data show that:
* Language Pitfalls have a minor impact when compared to other issues[3]
* Defects are, at best, weakly correlated with specific language choices.[4][5]
* Defect rates have a curvilinear relationship to the number of lines of code, with a clear increase as program module size becomes large. [6]

So - MISRA attempts to resolve a minor issue by doing something which is not correlated with the problems it claims to solve and which results in higher SLOC and therefore pushes an increase in defect rates. (This indirectly agrees with the conclusions of [0b])

Is that true? Or could it be that MISRA actually works? Or is it ineffective either way? How much time should we spend on MISRA & associated tools? How much effort in training? How much of that time & money could be spent on other tasks & training? How effective would that time & expenditure be in comparison?

Until somebody collects actual hard data then I don't know, and you don't know. Even the people prepared to sell you tools and training don't appear to know, or at least won't say exactly how in public, (but then again, they make sure to get paid either way). Right now the only real analysis I can find says avoid it, and nobody is asking for anything better.

Why? Well, managers I've spoken to go for MISRA, because it's easy; You trust the claims, buy a spec, book training for a few coders, tick a box. Done. This is far, far easier than fixing the schedule, or locking down requirements, or trying to understand problems in the architecture, or recruiting better developers, or persuading HR to pay more for better developers, or resourcing adequately up-front, or any one of the vast number of other issues: They're hard to achieve, the returns are viewed uncertain, they're politically difficult, and will take too long anyway.

So we go with the Shiny, be it MISRA or Agile or New Language Framework of The Week, and wonder why we have so much information on casualties, but nothing on how well the Shiny works.

[0] http://www.leshatton.org/index_SA.html
[0a] Hatton http://www.leshatton.org/Documents/SCSC_MISRAv2.pdf
[0b] Hatton http://www.leshatton.org/Documents/MISRA_comp_1105.pdf
[1] Hatton & Pfleeger http://www.leshatton.org/Documents/IEEEComputer1-97.pdf
[2] http://www.misra.org.uk/forum/viewtopic.php?f=56&t=710
[3] Perry, http://users.ece.utexas.edu/~perry/work/papers/1010-DP-ms25.pdf
[4] Hatton http://www.leshatton.org/Documents/FFF_IEE397.pdf,
[5] Mayer http://mayerdan.com/ruby/2012/11/11/bugs-per-line-of-code-ratio/)
[6] http://www.developer.com/tech/article.php/10923_3644656_2/Software-Quality-Metrics.htm