Geek Anvil (currently geeking...)

Does exactly what it says on the tin. Some of the nonsense contained herein may be very loosely related to The Sisters of Mercy, but I wouldn't bet your PayPal account on it. In keeping with the internet's general theme nothing written here should be taken as Gospel: over three quarters of it is utter gibberish, and most of the forum's denizens haven't spoken to another human being face-to-face for decades. Don't worry your pretty little heads about it. Above all else, remember this: You don't have to stay forever. I will understand.
User avatar
lazarus corporation
Lord Protector
Posts: 3433
Joined: 09 May 2004, 17:42
Location: out there on a darkened road
Contact:

Edit: making it a link because the image is too damn big

http://i.imgur.com/5KktamC.jpg
User avatar
Pista
Cureboi
Posts: 17583
Joined: 25 Jun 2006, 15:03
Location: Lost In A Forest
Contact:

:lol:
Cheers.
Steve
Just like the old days

TheCureCommunity
User avatar
markfiend
goriller of form 3b
Posts: 21181
Joined: 11 Nov 2003, 10:55
Location: st custards
Contact:

I've been at PHP Conference over the weekend. (Work paid for me to go.)

Christ what a sausage-fest. ~700 attendees of whom maybe 12 were women. :urff:
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
—Bertrand Russell
User avatar
DocSommer
Slight Overbomber
Posts: 1828
Joined: 17 Apr 2006, 11:53
Location: Hamburg

my new Adam A5X monitor speakers 8)
User avatar
lazarus corporation
Lord Protector
Posts: 3433
Joined: 09 May 2004, 17:42
Location: out there on a darkened road
Contact:

SQL Injection in practice

Image
User avatar
nowayjose
Utterly Bastard Groovy Amphetamine Filth
Posts: 539
Joined: 19 Mar 2006, 02:15
Location: Berlin

markfiend wrote:I've been at PHP Conference over the weekend. (Work paid for me to go.)
Christ what a sausage-fest. ~700 attendees of whom maybe 12 were women. :urff:
Twelve brought their mother?
User avatar
Pista
Cureboi
Posts: 17583
Joined: 25 Jun 2006, 15:03
Location: Lost In A Forest
Contact:

nowayjose wrote:
markfiend wrote:I've been at PHP Conference over the weekend. (Work paid for me to go.)
Christ what a sausage-fest. ~700 attendees of whom maybe 12 were women. :urff:
Twelve brought their mother?
:lol: :lol:
Cheers.
Steve
Just like the old days

TheCureCommunity
User avatar
DocSommer
Slight Overbomber
Posts: 1828
Joined: 17 Apr 2006, 11:53
Location: Hamburg

lazarus corporation wrote:SQL Injection in practice

Image

:lol: :lol: :lol: :notworthy: :notworthy:
User avatar
Quiff Boy
Herr Administrator
Posts: 16778
Joined: 25 Jan 2002, 00:00
Location: Lurking and fixing
Contact:

moshpits.js

A JavaScript implementation of the simulations presented in the paper Collective Motion of Moshers at Heavy Metal Concerts. More details are available at Itai Cohen's group website including videos of mosh pits, full simulations, and a brief description.

http://mattbierbaum.github.com/moshpits.js/

:eek:
What’s the difference between a buffalo and a bison?
User avatar
iesus
Overbomber
Posts: 4443
Joined: 15 Mar 2006, 11:15
Location: x-EU

Quiff Boy wrote:moshpits.js

A JavaScript implementation of the simulations presented in the paper Collective Motion of Moshers at Heavy Metal Concerts. More details are available at Itai Cohen's group website including videos of mosh pits, full simulations, and a brief description.

http://mattbierbaum.github.com/moshpits.js/

:eek:
impressive :?
the worst is that i am thinking of practical uses of this :urff: :lol:
'Are we the Baddies?'...
"Someday! Someday, everything you need, is just gonna fall out of the sky..." -A.E. Reading 1991
"Don't forget that most of the judges in witches trials had harvard degrees."
User avatar
Pista
Cureboi
Posts: 17583
Joined: 25 Jun 2006, 15:03
Location: Lost In A Forest
Contact:

Quiff Boy wrote:moshpits.js

A JavaScript implementation of the simulations presented in the paper Collective Motion of Moshers at Heavy Metal Concerts. More details are available at Itai Cohen's group website including videos of mosh pits, full simulations, and a brief description.

http://mattbierbaum.github.com/moshpits.js/

:eek:
Oh my!
That is seriously weird
Cheers.
Steve
Just like the old days

TheCureCommunity
User avatar
markfiend
goriller of form 3b
Posts: 21181
Joined: 11 Nov 2003, 10:55
Location: st custards
Contact:

Just installed the enlightenment window manager.

It is very shiny. Very shiny indeed.
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
—Bertrand Russell
User avatar
markfiend
goriller of form 3b
Posts: 21181
Joined: 11 Nov 2003, 10:55
Location: st custards
Contact:

Gosh I've moved off enlightenment onto xmonad since then...

Anyhoo, I've been turning my Raspberry Pi into a jukebox with a web front-end accessible from my whole home network. Also ordered a set of blinkenlights for it.
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
—Bertrand Russell
User avatar
lazarus corporation
Lord Protector
Posts: 3433
Joined: 09 May 2004, 17:42
Location: out there on a darkened road
Contact:

Upgrading from Apache 2.2 to Apache 2.4 is a bloody pain that involves editing too many vhost files
User avatar
Quiff Boy
Herr Administrator
Posts: 16778
Joined: 25 Jan 2002, 00:00
Location: Lurking and fixing
Contact:

media wiki 1.121. finally.
What’s the difference between a buffalo and a bison?
User avatar
markfiend
goriller of form 3b
Posts: 21181
Joined: 11 Nov 2003, 10:55
Location: st custards
Contact:

lazarus corporation wrote:Upgrading from Apache 2.2 to Apache 2.4 is a bloody pain that involves editing too many vhost files
Oh goody. I'm on 2.2.25-1 at the moment. Having said that...
Arch linux wiki wrote: Note: Even though Apache 2.4 was released over a year ago (Feb 2012), it still isn't available in the official repositories. You can however get it from the AUR as apache24.
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
—Bertrand Russell
User avatar
lazarus corporation
Lord Protector
Posts: 3433
Joined: 09 May 2004, 17:42
Location: out there on a darkened road
Contact:

I have bought myself a 3D printer.

Or more correctly, I have bought myself a heavy box full of parts that after much soldering, bolting, measuring, drilling, and swearing, will become a 3D printer.

Eventually it should look like this: http://www.reprappro.com/products/mono-mendel/
User avatar
lazarus corporation
Lord Protector
Posts: 3433
Joined: 09 May 2004, 17:42
Location: out there on a darkened road
Contact:

So, I last posted here in October. OK: geek report:

1. Launched new version of my website: http://www.lazaruscorporation.co.uk/ - for the geeks: PHP 5.5, ZF2, Doctrine 2, CSS media queries, and a fuckload (technical term) of RDFa

2. 3D printer still only half-assembled - will take a crack at it this weekend to try to get it finished
User avatar
Pista
Cureboi
Posts: 17583
Joined: 25 Jun 2006, 15:03
Location: Lost In A Forest
Contact:

My customised Moto X
Image

I had the Unknown Pleasures cover laser marked on the back at work 8)
Cheers.
Steve
Just like the old days

TheCureCommunity
User avatar
James Blast
Banned
Posts: 24699
Joined: 11 Jun 2003, 18:58
Location: back from some place else

tit
"And when you start to think about death, you start to think about what's after it. And then you start hoping there is a God. For me, it's a frightening thought to go nowhere".
~ Peter Steele
User avatar
timsinister
The Oncoming Storm
Posts: 4568
Joined: 04 Jan 2005, 17:08
Location: Newcastle
Contact:

Pista wrote:My customised Moto X
Image

I had the Unknown Pleasures cover laser marked on the back at work 8)
Image
User avatar
markfiend
goriller of form 3b
Posts: 21181
Joined: 11 Nov 2003, 10:55
Location: st custards
Contact:

I was bored so I wrote a Brainf*ck interpreter in python.

Code: Select all

#!/usr/bin/python2
"""
A Brainf_ck interpreter in Python
Copyright (c) 2014 by Mark Wolstenholme
released under GPL v3 or later

I'll assume you know what Brainf_ck is:
> 	Increment the pointer.
< 	Decrement the pointer.
+ 	Increment the byte at the pointer.
- 	Decrement the byte at the pointer.
. 	Output the byte at the pointer.
, 	Input a byte and store it in the byte at the pointer.
&#91; 	Jump forward past the matching &#93; if the byte at the pointer is zero.
&#93; 	Jump backward to the matching &#91; unless the byte at the pointer is zero.
"""
from sys import argv

class Brainf_ck&#58;
    'Brainf_ck class.'

    def __init__&#40;self&#41;&#58;
        'Set up the internals'
        # give it 64k to play with
        self.storage = bytearray&#40;65536&#41; 
        # We also need somewhere to store the locations of the &#91; and &#93;
        self.loopstarts, self.loopends = &#123;&#125;, &#123;&#125;
        # build an output string internally
        self.output = ''
        # We need an input string
        self.inpt = ''
        # And we need a storage pointer and a program counter
        self.pointer, self.counter = 0, 0
        # Instructions dictionary mapped to functions of this class
        self.instructions = &#123;
            '>'&#58; self._inc,
            '<'&#58; self._dec,
            '+'&#58; self._p_inc,
            '-'&#58; self._p_dec,
            '.'&#58; self._to_out,
            ','&#58; self._from_in,
            '&#91;'&#58; self._forward,
            '&#93;'&#58; self._back
        &#125;

    def _inc&#40;self&#41;&#58;
        'Increment the pointer. >'
        self.pointer = &#40;self.pointer + 1&#41; % len&#40;self.storage&#41;

    def _dec&#40;self&#41;&#58;
        'Decrement the pointer. <'
        self.pointer = &#40;self.pointer - 1&#41; % len&#40;self.storage&#41;

    def _p_inc&#40;self&#41;&#58;
        'Increment the byte at the pointer. +'
        self.storage&#91;self.pointer&#93; = &#40;self.storage&#91;self.pointer&#93; + 1&#41; % 256

    def _p_dec&#40;self&#41;&#58;
        'Decrement the byte at the pointer. -'
        self.storage&#91;self.pointer&#93; = &#40;self.storage&#91;self.pointer&#93; - 1&#41; % 256

    def _to_out&#40;self&#41;&#58;
        'Output the byte at the pointer. .'
        self.output += chr&#40;self.storage&#91;self.pointer&#93;&#41;

    def _from_in&#40;self&#41;&#58;
        'Input a byte and store it in the byte at the pointer. ,'
        if self.inpt == ''&#58;
            self.storage&#91;self.pointer&#93; = 255 # -1 as EOF
        else&#58;
            self.storage&#91;self.pointer&#93; = ord&#40;self.inpt&#91;0&#93;&#41;
            self.inpt = self.inpt&#91;1&#58;&#93;

    def _forward&#40;self&#41;&#58;
        'Jump forward past the matching &#93; if the byte at the pointer is zero. &#91;'
        if self.storage&#91;self.pointer&#93; == 0&#58;
            self.counter = self.loopends&#91;self.counter&#93;

    def _back&#40;self&#41;&#58;
        'Jump backward to the matching &#91; unless the byte at the pointer is zero. &#93;'
        if self.storage&#91;self.pointer&#93; != 0&#58;
            self.counter = self.loopstarts&#91;self.counter&#93;

    def document&#40;self&#41;&#58;
        'Output some documentation.'
        self.output = 'A Brainf_ck interpreter in Python\n'
        self.output += '\n'
        self.output += 'Usage&#58;\n'
        self.output += 'brainf_ck.py <BRAINF_CKCODE> &#91;<INPUTSTRING>&#93;'

    def interpret&#40;self, bfcode, inpt&#41;&#58;
        'Run the bfcode using inputstring inpt.'
        self._find_loops&#40;bfcode&#41;
        self.inpt = inpt
        while self.counter < len&#40;bfcode&#41;&#58;
            if bfcode&#91;self.counter&#93; in self.instructions&#58;
                self.instructions&#91;bfcode&#91;self.counter&#93;&#93;&#40;&#41;
            self.counter += 1

    def _find_loops&#40;self, bfcode&#41;&#58;
        'Store the locations of &#91; and &#93; for looping'
        stack = &#91;&#93;
        for a in range&#40;len&#40;bfcode&#41;&#41;&#58;
            if bfcode&#91;a&#93; == '&#91;'&#58;
                stack.append&#40;a&#41;
            if bfcode&#91;a&#93; == '&#93;'&#58;
                self.loopstarts&#91;a&#93; = stack&#91;-1&#93;
                self.loopends&#91;stack&#91;-1&#93;&#93; = a
                stack = stack&#91;&#58;-1&#93;
        if len&#40;stack&#41; != 0&#58;
            raise SyntaxError&#40;'Mismatching &#91;&#93;'&#41;

if __name__ == "__main__"&#58;
    bf = Brainf_ck&#40;&#41;
    if len&#40;argv&#41; == 1&#58;
        bf.document&#40;&#41;
    elif len&#40;argv&#41; == 2&#58;
        bf.interpret&#40;argv&#91;1&#93;, ''&#41;
    else&#58;
        bf.interpret&#40;argv&#91;1&#93;, argv&#91;2&#93;&#41;
    print bf.output
The fundamental cause of the trouble is that in the modern world the stupid are cocksure while the intelligent are full of doubt.
—Bertrand Russell
User avatar
James Blast
Banned
Posts: 24699
Joined: 11 Jun 2003, 18:58
Location: back from some place else

Mavericks broke my iMac :evil:
"And when you start to think about death, you start to think about what's after it. And then you start hoping there is a God. For me, it's a frightening thought to go nowhere".
~ Peter Steele
User avatar
Silver_Owl
The Don
Posts: 7498
Joined: 27 Sep 2003, 18:52

James Blast wrote:Mavericks broke my iMac :evil:
What happened?
We forgive as we forget
As the day is long.
User avatar
James Blast
Banned
Posts: 24699
Joined: 11 Jun 2003, 18:58
Location: back from some place else

I d/l something dogey from the internets last Saturday and my machine ground to an halt. My optical drive's fecked so I couldn't use the systems discs that it came with to restore it, my only options was to go for Mavericks, now anytime I try to change anything it asks me for an Admin name and p/w. It doesn't recognise anything I input, so I'm stuck on Pacific Time.
"And when you start to think about death, you start to think about what's after it. And then you start hoping there is a God. For me, it's a frightening thought to go nowhere".
~ Peter Steele
Post Reply