A Conversation for H2G2 Waterworks & Beach
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
typolifi Posted Apr 25, 2001
It's °not° mouth, it's pocket.
It's °not° mould, it's sand.
It's...
Oh! all right...
Then a brand new supreme for me, please
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
J'au-æmne Posted Apr 25, 2001
*hands over chocolate supreme, wondering how slow one computer can be*
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
MaW Posted Apr 25, 2001
You should try writing recursive routines to solve maths problems on a programmable calculator. Now _that's_ slow...
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
J'au-æmne Posted Apr 25, 2001
You should try programming tetris into a graphical calculator. i got bored
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
MaW Posted Apr 25, 2001
Nope, can't say I've tried that one...
Does anyone have any idea how I can write a Haskell function to generate lists of lists of Bool values so that they represent every possible combination of True and False for a given number of variables? For example, for two it would be
[[False,False],[False,True],[True,False],[True,True]]
I can't get it to work! My best effort so far produced
[[False,False],[False,True],[False,True],[True,True]]
Which is clearly not acceptable, especially as it will form part of a tautology checker. Help!
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
typolifi Posted Apr 27, 2001
Ohum! And where did you get the donut, Blueb?
Mt Sandcastle's Sparklin' Doughnut Stall
typolifi Posted Apr 27, 2001
Because if you don't produce some of your own and if you didn't steal it from Joanna's ..herm... donut producing machine, then it means it's a SECOND HAND donut!
Aha!
Besides, Happy Birthday h2g2!!!
Mt Sandcastle's Sparklin' Doughnut Stall
Bluebottle Posted Apr 27, 2001
I didn't steal it from the counter, I assumed that the SSS was up, so I helped myself.
Which I can do as Joanna leases the stall from me
So it isn't a second-hand , it's a new one on display.
<BB<
Mt Sandcastle's Sparklin' Doughnut Stall
J'au-æmne Posted Apr 27, 2001
BB can help himself to lectures as and when he likes... If it weren't for him the stall wouldn't be here....
Tommorrow, as well as being h2g2's birthday is HildBede College day and Andy's and my 6 month anniversary...
Mt Sandcastle's Sparklin' Doughnut Stall
typolifi Posted Apr 27, 2001
Waaw great!
And on sunday it's the birthday of my little brother!
Let's have a cinnamon doughnut then!
Mt Sandcastle's Sparklin' Doughnut Stall
MaW Posted Apr 27, 2001
Woo! What a day. Remember last year's birthday meet Joanna? I have some photos somewhere of you making big bubbles in Hyde Park
I got that pesky Haskell function working. For a while, I thought the problem might be that I was using [] as the base case instead of [[]] but that turned out not to be so. So instead I looked at it again and after some fairly unsubtle hints dropped by the lecturer I came up with these three functions:
addfalse :: [Bool] -> [Bool]
addfalse xs = False : xs
addtrue :: [Bool] -> [Bool]
addtrue xs = True : xs
bools :: Int -> [[Bool]]
bools 1 = [[False],[True]]
bools (n+1) = (map addfalse (bools n)) ++ (map addtrue (bools n))
Which are perfect! I suppose I could make addtrue and addfalse into one function that takes an extra parameter, but there's not really any need to... Now I have to write a function to pick out a value associated with a particular key in a list of key/value pairs like this:
[('A',True),('B',False)]
So far everything I've tried has given me type errors, but I'm working on it...
* takes supreme *
Mt Sandcastle's Sparklin' Doughnut Stall
typolifi Posted Apr 27, 2001
What do you intend to do with this, Maw?
*typolifi notice he didn't receive his cinnamon doughnut*
*he imagines he's got one*
*or rather, he imagines he's got a h2g2 (i.e. virtual) one*
*he eats the imaginary virtual doughnut*
Besides, thanks for the GuidePost! I use very often. (as a matter of fact I would be ridiculous if I revealed how often I use it).
Mt Sandcastle's Sparklin' Doughnut Stall
MaW Posted Apr 27, 2001
It's worth 15% of my Functional Programming module, that's why I'm doing it.
You like GuidePost? Great! It will be improved, I promise. I'm trying to work out how to do syntax highlighting, but it's not going all that well at the moment. I'm wondering if I can use some sort of finite or pushdown automaton to recognise the tags, attributes and so on... probably can!
Key: Complain about this post
Mt Sandcastle's Not Like In Good Ol Times Doughnut Stall
- 261: Bluebottle (Apr 24, 2001)
- 262: typolifi (Apr 25, 2001)
- 263: J'au-æmne (Apr 25, 2001)
- 264: Bluebottle (Apr 25, 2001)
- 265: J'au-æmne (Apr 25, 2001)
- 266: Bluebottle (Apr 25, 2001)
- 267: MaW (Apr 25, 2001)
- 268: J'au-æmne (Apr 25, 2001)
- 269: MaW (Apr 25, 2001)
- 270: Bluebottle (Apr 26, 2001)
- 271: typolifi (Apr 27, 2001)
- 272: Bluebottle (Apr 27, 2001)
- 273: typolifi (Apr 27, 2001)
- 274: Bluebottle (Apr 27, 2001)
- 275: J'au-æmne (Apr 27, 2001)
- 276: Bluebottle (Apr 27, 2001)
- 277: typolifi (Apr 27, 2001)
- 278: MaW (Apr 27, 2001)
- 279: typolifi (Apr 27, 2001)
- 280: MaW (Apr 27, 2001)
More Conversations for H2G2 Waterworks & Beach
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."