Hello 
I'm Siobhan Curran/Kisa Naumova, and this is my weblog. I tend to write about stuff like crossdressing, Macs, code, cats, wine and Second Life, but in general it's just an ongoing conversation about all sorts of stuff. If you'd like to know a little bit more about what this all is, I recommend starting on this page which has a little bit of info on who I am, and what I'm trying to do — or you could dive into my five years worth of archives if you like.
Otherwise, feel free to close this box and explore...
Burgers À Lá Curran
For some reason, unbeknownst to me, my home-made burgers appear to be rather popular with my friends, and since my sister is coming to visit me today (in about an hour) and I've decided to have a stab at a barbeque, I decided to make a batch of them.
And since I'm a lovely person, I decided also that I would share my recipe:
Burgers À Lá Curran
Ingredients
(And these are very precise and should not under any circumstances be deviated from)
- A wodge of mince
- A stack of corriander
- A couple of onions
- About the same amount of chillies (red or green, or whatever)
- Some salt and pepper
- Maybe an egg
Instructions
Shove the mince on a bowl. Chop up the corriander, onions and chillies very finely. Whack them in the bowl two. Mash it all together with a little salt and pepper. If it looks like it's going to fall apart, chuck in a beaten egg
Siobhan
MMMMM home-made burgers: so much better than the burger ice lollies you end up with when folk bring frozen food to barbie. I've taken notes and will be using your recipe this summer.
Susan 2
Cool
It's true, stuff you make yourself tastes better.
On The Question Of Text Editors
So, diving back into Geek Mode for a second OK? Now that everything is driven by text files, and writing/updating things is much easier for me, I'm now trying to find the best text editor to use.
What I'm after is one that recognises when changes are made to the source document, ane reflects that in the editor. So, for an example, say I'm sat here, merrily typing away, and someone posts a comment, I want that comment to appear in the editor.
At the moment, if I hit [Esc] :wq , I'll lose anything that gets posted after I dive in vi (I think)
I thought I'd hit the jackpot with SubEthaEdit, but it doesn't do what I want it to ![]()
It is just possible that I'm asking for the Moon On A Stick here. I've got an idea in my head how an editor like that might work, but my coding isn't up to it...
Dammit! Too late again! I wanted to talk about the burgers! ![]()
Don't worry Becky — If the burgers go down well you are bound to hear about them again!
Katie
I can tell you what I'd use: Subversion.
Now it's possibly overkill for what you're doing, but that said, it's the absolute bees knees when it comes to managing changing filesets. It'll happily merge two copies of a document that started out identical but then got edited at the same time. In addition it's great for version history and keeping backups. It's all command-line tastic, easily incorporated into scripts and...well...I love it. It just takes a couple of mo's to learn is all.
Oh, and you should use it to store your PHP stuff too. ![]()
Thanks Kris
I was hoping you'd have some idea — I'll check it out later
For my money, Subversion would be overkill. It's excellent stuff, but it's a sledgehammer/walnut situation. What I would do (erm, if I ever did anything for myself of note) would be seperate your content and the comments into two seperate files, and get the PHP to merge them. Assign each comment a unique ID, have the CMS tag that ID into your content. If you're editing content when a comment is left, the tag wouldn't get written, so have the CMS take care of this eventuality by looking for orphaned comment IDs and adding them to the end of the content.
Or something. ![]()
The burgers went down very well. And despite her assurance that there were tons I only got one. If I were a trannie I might flounce off but being just me I'm going to re-fill my wine glass and deal with the whole situation calmly and without strop!
Katie
OK well bit of a strop — here it comes — pfft!
Me again
Nice site... shame I mised the food earlier on.
I could have done with a little bit of meat tonight
Did you get my Sparkle Art e-mail??
Its late... and I'm working tomorrow... what on earth am I doing here when I should be tucked up in bed?
Night night, Ms Curran
Laura handbag
Some follow-up thoughts:
The burgers went down very well. And despite her assurance that there were tons I only got one.
But there were plenty sitting on a plate — all you had to do was take them ![]()
I could have done with a little bit of meat tonight
LOL — Rude! ![]()
Did you get my Sparkle Art e-mail??
I did Laura — I'm just trying to work out what to submit at the moment. Stripes or film?..
seperate your content and the comments into two seperate files, and get the PHP to merge them. Assign each comment a unique ID, have the CMS tag that ID into your content. If you're editing content when a comment is left, the tag wouldn't get written, so have the CMS take care of this eventuality by looking for orphaned comment IDs and adding them to the end of the content.
I can't seperate the comments (or at least, I don't want to) — having the comments inline is one of the core things about this weblog. What I could do (on similar lines) though, is have the PHP check whether the text file is open (by me), and if it is, then write the comment to a temporary file. Then wait for me to close the file, and tack the temporary file onto the end.
I'm not quite sure how to check if the file is open (I'll have to look into that) but I'm imagining some kind of cron job that runs every minute and tries to merge the tempfile.
It could be a completely transparent process — the files are stored in a directory structure like this:
![]()
/2005/06/06
ie, a folder for the year, a folder for the month, then a file for the day. I could get the PHP to include /2005/06/06-tmp (or something) at the end of each weblog entry, if the file exists. So to the reader, it would look as if the comment was already part of the entry — but when I finished writing, it would get tacked onto the end.
...if that makes sense... ![]()
So you absolutely, definitely, 100% FACT want the comments to be stored within the same file as the content, and not have the two files merged together like when you do that shuffle ripple thing with two piles of cards, then. Okay, make it hard ![]()
I can think of half a dozen ways of doing things but they're all suitable for different situations. My suggestion would be to have a flag representing the edit status of a post, as a single small file (how VERY Unixy).
echo "1" > /home/siobhan/tranniefesto/2005/06/07-editflag
(Obviously script something to make it a bit less unwieldy.) CMS now knows to pipe comments into the temporary store. Commenter gets told to hold their horses for a moment before stabbing at reload a whole bunch of times thinking it's all gone silicone skyward.
echo "0" > /all/that/above
Next time the page is requested, patented CMS spots the temporary store, appends and deletes it.
Now, depending on where and how you're posting, you could have a secret control panel to switch things on and off, or SSH in and use the aforementioned scripts.
Gawd, I should be doing work ![]()
Of course, the problem that Kath has just pointed out to me, is that if you add a comment, you won't be expecting what you write to appear after a bunch of new stuff.
So, what I think I need to do is hardcode some kind of insertion point, that keeps a record of where things were before I start editing, then moves itself to the end when I save.
Sorry, just thinking out loud here. I guess the process would be something like:
> touch /2005/06/06-tmp
> vi /2005/06/06
> rm /2005/06/06-tmp
And then the PHP script knows that if the file $whatever."-tmp" exists, it should pipe (even MORE Unixy
) the comments into that rather than $whatever
That last rm shouldn't actually be a rm — it should be a script that merges $whatever."-tmp" with $whatever then rms $whatever."-tmp"
This is, in effect doing what you've outlined above — but using the flag file as a flag and the temporary store.
This is the moment, incidently, where I realise that I'm going have to learn PERL
My sister though, last night, seemed to think that Ruby was the way to go these days (We're a family of geeks
) I had a Google yesterday for comparisons between PHP and PERL, and discovered that I was coming to this the wrong way round — the general movement seems to be "PHP is easy to learn if you know PERL"
Hopefully that works the other way around...
Never tried Ruby, but I know of it... something like Perl tidied up I think. Of course, there's Python as well, which seems to be able to handle much of what gets thrown at it. And don't forget the classic bash scripting — my friend's company has a whole load of e-commerce sites running off them!
Also, don't underestimate the power of PHP. My company is doing a set of educational kids games at the moment, entirely in Flash, except for when it gets too tricky for ActionScript, when it gets farmed out to php.exe in a subdirectory ![]()
I'd completely forgotten that you can run PHP at the command line ![]()
The main thought behind diving into Perl though, was that a module already exists for it to interact with the Flickr API — there are a couple of Cool Things™ that I'd like to do with it (starting with enabling Flickr screennames in my comment form, as well as email addresses for Gravatars
)
You're right though — what I was talking about above is crying out for a bash script...
There's a module for PHP too, courtesy of Cal Henderson. It's all here...
http://www.flickr.com/services/api/
But by all means, battle with Perl!
LOL
It might be fun...
The PHP module needs PEAR installed though
There's one for PHP5, but I'm a little reticent to install that on my server just at the moment.
Ignore me OK? I was confusing PEAR with something else (not quite sure what
) PEAR is, of course, already installed with my version of PHP...
I was confusing PEAR with something else
A delicious juicy fruit, perhaps. ![]()



'scuse me — just checking something