Mushy-pea 36 What, you can change this tag?

Hi. I just thought I'd post this photo of me and some graffiti lights in Bristol. I'd never come accross such a thing before, but given the city's traditions I perhaps shouldn't be surprised.

Steven

22802893a6963c1ba779ea316309fb65

Mushy-pea 36 What, you can change this tag?

Hi. I've developed a bit of an interest in encryption as well as programming in Haskell since I last used this forum. So I decided to build a symmetric block cipher and test its properties to gain more of an understanding of such things. This is for research purposes as they say. I'm not planning to use it with any sensitive data, but I thought it would be interesting to set a little challenge. The code is below together with a description, an example ciphertext and key for demonstration. There is then another ciphertext which contains a Bitcoin address (holding 0.0148 BTC), its private key and some further text. Sorry the prize is so puny but I did say I'm not using sensitive data. So, if anyone is interested in this kind of thing feel free to go for the coin (which will stay there for at least 365 days) and leave any "constructive" comments.

-- Cipher 126 code by Steven Tinsley.

module Main where

import System.IO
import System.Environment
import Data.List
import Data.Bits
import Data.Array.IO

char_set = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /!\"£$%^&*()-_=+[]{};:'@#~\\|,.<>.?\n\t`¬¥èéùìòÇØøÅå§ÄÖÑÜ¿öñüà€©®½¾"

dec_bin1 :: Float -> Float -> [Int]
dec_bin1 d_num factor = if (d_num - factor) < 0 then 0 : dec_bin1 d_num (factor / 2)
                        else if (d_num - factor) == 0 then [1]
                        else 1 : dec_bin1 (d_num - factor) (factor / 2)

dec_bin0 :: [Int] -> [Int]
dec_bin0 [] = []
dec_bin0 (x:xs) = pad0 (dec_bin1 (fromIntegral x) 32) ++ dec_bin0 xs

pad0 :: [Int] -> [Int]
pad0 …
Mushy-pea 36 What, you can change this tag?

Thanks. I'm an English teacher so standards must be kept high :) . As promised, here's the rest of it.

Part 2

Jane stared curiously at the empty closet for a few seconds in silence while a cold sweat seeped through the skin of her face, feeling her pulse quicken and a sense of unreality set in. Something intuitive within her said clearly that this was no magic trick or prank. “Before you ask more about it,” said Johnston just stalling a question on her lips, “look at the transport manifest again.”. She looked and found that the 30 inch monitor had disappeared from the list of transported items. “It has not only been removed from existence in the present moment but from every moment in which it ever existed.” Johnston explained. “The only evidence left that it ever existed are the memories we have of it, because we saw it put into the closet. That's how the machine works. It's come in quite useful over the last year or so when one of our guys has broken a clients item. As long as I could get the damaged thing here the problem was as good as forgotten. Literally.”.

“So it's a machine of some kind. I won't pretend to have the mind to understand how it works. How did you find out about it though? Where did it come from and how the hell did it get into the office?”. Jane had composed herself again and …

Mushy-pea 36 What, you can change this tag?

Hi. I haven't posted here for some time but I'm still a big fan. Anyway, I had an interesting dream last night and it inspired me to write a short story based on it. I hope no one minds if I post the first part of it here for your (possible) entertainment.

Existence and the lack of it (part 1)

Jane Paters worked in the London office of a small commercial relocation company. Their business centred around helping other companies move their operations from one office to another, quickly and with a minimum of down time involved. Jane was a secretary and receptionist who had become a dependable and well liked character in the office. It was Monday morning and she was just returning to her desk after a tea break when Mr Johnston the site director walked in carrying a large computer monitor with a crack right across the screen. It was evidently quite heavy from the concentrated look on his face and he was soon struggling to open the door to the store room while supporting it's weight.

“Can I give you a hand there Johnston?” asked Jane in her Yorkshire accent, already walking over to help. For some reason Mr Johnston preferred people to use his second name as if it were his first. “Oh, thanks Jane. If you could just hold the door open from the inside that'd be great.”. She duly obliged and soon they were both inside with the monitor on …

Mushy-pea 36 What, you can change this tag?

This snippit is a follow up to my first snippit, namely "Simple website hit counter" which is written in Perl. It does exactly the same thing using PHP. "Boring", you might say? Well, I have my reasons for wanting to learn this language and one needs to start somewhere :) . Also, it will give me a chance to compare how the two languages work for samll programs. If you want to make the counter work on your website you can grab the number tiles from my home page if you like (from the root URL load [0-9]tile.gif). Enjoy.

Steven.

LastMitch commented: Thanks for sharing! +12
Mushy-pea 36 What, you can change this tag?

You forget one or maybe two things...

Yes, you are quite right. Humans are too greedy and power hungry for such a system to not become corrupt and oppressive. What a shame, hey?

Steven.

Aia commented: Bingo! +17
Mushy-pea 36 What, you can change this tag?

The strength of a classical gravitational field is measured in N kg ^ -1 (Newtons per kilogram). On the surface of the earth this is measured to be about 9.8 N kg ^ -1. Apologies if this has already been said in the thread, but I'm in an internet cafe so in a rush. If no one minds I'll set another question seeing as the last one apparently went a bit "stale":

An imaginary new HD video system (called Purple - Ray) has been launched and the laser it uses to read the disks has a wavelength of 400 nm (4 * 10 ^ -9 m). The lens used has a numerical appature of 1.5. What is the minimum size the markings on the disk (that represent the data) could have and still be resolved by the laser?

Note: numerical aperture is a dimensionless quantity, hence the lack of a unit.

Steven.

Mushy-pea 36 What, you can change this tag?

WYSIWYG stands for What You See Is What You Get. A WYSIWIG web page editor is an application where you can build a web page a bit like you would build a page on a word processor or desktop publishing app. You place the various items (i.e. text, links, images) where you want them to appear on the page and the editor generates HTML to represent this. When you view one of these pages on a browser it should look just like it did on the editor.

Steven.

Jaysun commented: Awesome answer! +1
Mushy-pea 36 What, you can change this tag?

too shy to talk to women in the wild

I said somthing similar to that to a friend once. You know what he said?

I think strong larger is the key

Since then I've found there's some truth in his advice :p . Don't get too drunk and try to pull though or it'll be worse than if you were sober :lol: .

Steven.

iamthwee commented: good advice(iamthwee) +6
Mushy-pea 36 What, you can change this tag?

In my experience Windows 98 is one of the most stable OSs I have used. Here you can see it running over 20 user applications:

http://www.rochfest.co.uk/windows98_rules.jpg

Note the inclusion of the whole Office 97 suite. Even after this happened

http://www.rochfest.co.uk/oh_dear.jpg

the system was able to recover fairly quickly. I should also point out that this machine has been on Broadband for about 6 months with no firewall or virus scanner (and before that on dial-up with no protection for over a year). Conclusion: WINDOWS 98 RULES!

Steven.

Mushy-pea 36 What, you can change this tag?

Hello everyone. I was trying to compile a Linux kernel module yesterday called vmmon (which you need to make VMware work on Linux) for the 2.6.16.7 kernel. First I installed a GCC package made for my distro, Puppy Linux 2.00. The package turned out to be for a slightly different version of the distro (2.02), so it didn't have the correct header files in it. So, I picked up the appropriate source code from kernel.org and put it in

/lib/modules/linux-2.6.16.7/include

The VMware install script tries to build the module for you, but after I tell it where the kernel header files are it comes up with:

/lib/modules/linux-2.6.16.7 does contain kernel header files, but it does not contain version.h.  This may indicate you have not built the kernel.
 
Unable to build the module.

So I need to know; what is inside this version.h file and how do I create one. Any help would be appriciated.

Steven.

Mushy-pea 36 What, you can change this tag?

Hello everyone. Nice forum you have here. Here are a few details about me.

Name: Steven Tinsley

Nickname: Mushy-pea

Age: 24

Location: Wales, United Kingdom (leaving for England as soon as possible).

Grew up in: Rochdale (UK).

Education: BSc Physics (Surrey, 2005)

Occupation:

1. Trying to get a "proper" job.
2. Organising a music festival in my home town (Rochfest 2007).

Main reason to use Daniweb: To get advice for building my website, to promote my festival.

Hobbies: Playing the guitar, listening to music, reading, walking.

While I'm here I'd like to ask Dani a question; did you start Daniweb and is it named after you?

Talk later then.

Steven.