Page 1 of 2 12 LastLast
Results 1 to 40 of 65

Thread: Yr Wyddfa ?!!

  1. #1

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Yr Wyddfa ?!!

    See!

    Made you look!!

    Last edited by yrwyddfa; Aug 15th, 2005 at 09:40 AM.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yrwyddfa ?!!

    Hey! THIS IS THE BEST THREAD EVAR!!!!111111!!!111!1!1+?+?+1+?+1?!?!?!?1?+1+1+!


    I feel n00b cells are gathering around my head...

  3. #3
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Yrwyddfa ?!!

    Don't expect me to quote you on anything. It will take me 3 minutes just to type your name correctly.

  4. #4
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yrwyddfa ?!!

    yrwyddfa is easy to type and remember. Y-R-W-Y-D-D-F-A.

    Y R

    W Y D D

    F A

    Took me about 20 seconds to write this whole message and I'm not even a native speaker of this darn language.

  5. #5

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yrwyddfa ?!!

    I know it's childish but hey: I still made you look!
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  6. #6

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yrwyddfa ?!!

    Quote Originally Posted by Merri
    yrwyddfa is easy to type and remember. Y-R-W-Y-D-D-F-A.

    Y R

    W Y D D

    F A

    Took me about 20 seconds to write this whole message and I'm not even a native speaker of this darn language.
    It's Welsh for 'The Tomb' or somthing.

    . . . and once you start . . . well you'll know where you'll end up.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  7. #7
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yrwyddfa ?!!

    Posting a silly message in this thread.

  8. #8

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yrwyddfa ?!!

    Indeed.

    Now IS the time for all good men to come to the aid of the party
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  9. #9
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    Fine then, dont invite me!

  10. #10
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Mario Party?

  11. #11

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by kfcSmitty
    Fine then, dont invite me!
    Girls are, of course, invited. But their aid to the party is somewhat different from that which is provided by men (or boys in the case of most on this forum)
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  12. #12
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by yrwyddfa
    Girls are, of course, invited. But their aid to the party is somewhat different from that which is provided by men (or boys in the case of most on this forum)
    I was referring to the "good men" part of your post

  13. #13

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by kfcSmitty
    I was referring to the "good men" part of your post
    There is only "a few good men" (sorry) available around here.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  14. #14
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    are you bored today? You're going crazy on the CC posts

    Come to think of it, I think i've only really seen you post in the world events forum

  15. #15

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    I post all over the place. I've helped many a poor soul out of their well of doom.

    Normally with a well place bucket and rope.

    Yes, I'm bored.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  16. #16

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    I post all over the place. I've helped many a poor soul out of their well of doom.

    Normally with a well placed bucket and rope.

    Yes, I'm bored.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  17. #17
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Take part in the sudoku contest. No more need to be bored. Actually, it takes most of you life and sucks you into the world of sudoku, where there is no return out of. My English rocks.

  18. #18
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    I wanted to try the sudoku solver, but I don't udnerstand how the puzzels work, and I have no idea where to start....Damn me being a newbie

  19. #19

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Yeah - I looked at the Sudoku problem it appears it's just a graph-colouring problem - albeit it an NP one.

    Still you can use partial transitive closure techniques to 'guess' the hard ones.

    Didn't think it was particularly fair on the noobs .. . .

    (and I can't be bothered)
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  20. #20
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    If you get enough interest into it and just start pondering and coding, you ought to learn a lot when you get into it. Even if you don't manage to get it ready for the contest you get valuable experience

    This almost sounds like a non Chit Chat post... no wait! There is something fishy about this... yes! A non CC person posts in CC!

  21. #21

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by Merri
    If you get enough interest into it and just start pondering and coding, you ought to learn a lot when you get into it. Even if you don't manage to get it ready for the contest you get valuable experience

    This almost sounds like a non Chit Chat post... no wait! There is something fishy about this... yes! A non CC person posts in CC!
    I still can't be bothered.

    Now if there was $$$$$$ then that is certainly a motivation . . .

    The challenge here is to make (in my case VB6) perform well outside of the box particulary as this problem screams for heap memory and I feel that I would need proper dereferencing (copymemory too slow) in order to get it fly

    That means inline machine code which is probably against the rules.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  22. #22
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Why the problem would need heap memory? My solver runs any sudoku well under 2800 bytes, most don't require even 400 bytes to solve...

  23. #23

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    It depends on how the 2.8k is allocated. If it's stack allocated that's fine. If it's heap allocated then you'll be agreeing with me.

    if you're using SAFEARRAY's (VB's native array type) then you're using heap memory unless you're using very very special techniques to keep the pvData and it's associated memory on th stack.

    If you're not then you're using heap memory. If you're accessing directly using pvData then you're gonna need to dereference it.

    You can do this using the array syntax (at least one multiplication happens on each access; more (and much less efficient) if you're using more than one dimension) or you can dereference directly using pvData, pointer arithmetic, and CopyMemory.

    It's faster to use :

    VB Code:
    1. mov  ecx,   [esp+4]
    2. mov  eax,   [ebp + ecx]
    3. ret 4

    which dereferences a pointer and returns it in the eax register.
    Last edited by yrwyddfa; Aug 15th, 2005 at 11:03 AM.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  24. #24

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    See - I told you I'm bored.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  25. #25
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    I'm not good with terms. Probably need to Google to figure out what heap memory actually means. But yes, I'm using native fixed size VB arrays without any tricks into them. They're fast enough and never really bothered to try to figure out other ways to access them. I do optimize so that I use them the least I can though, a lot of temporary variables used.

    I guess you can already figure that I don't know ASM either. As we discussed at some point: it is more about the programmer than the language

  26. #26

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Yes I am bored. I dragged that assembler from some code that derived from some book published years ago . . can't even remember the name.

    That was when I was interested in kicking the butts of nasty C++ programmers. DO you remember when those who programmed in C++ thought they were efficient programmers? They never realised it was the compiler. Those were the days when it was easy to get VB to outperform C++ . . . .

    Still was a long time ago, and I don't care too much for this now. I occasionally come across a problem that I'll spent days investigating, but those days are generally long gone.

    I'm more interested in playing cricket with my kids.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  27. #27

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by Merri
    As we discussed at some point: it is more about the programmer than the language
    Yup
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  28. #28

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by Merri
    I'm using native fixed size VB arrays without any tricks into them. They're fast enough . . .
    Yeah that's good technique. VB can really optimise access to them, and the SAFEARRAY code in oleaut is optimised for fixed length stuff.

    It's also a good lesson for noobs to learn: That is to never to exceed the problem domain. In this example you never need more than nine 81 element arrays. To make those arrays dynamic is a waste of time and resources (assuming you're going for a brute force aproachrather than a more heuristic approach)

    I may give it a go this weekend using evolved neural nets. Might be fun. But I bet the sun comes out and I end up the village green with my kids, my beautiful wife, and a pint of ale . . .
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  29. #29
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Ah, I'm too young in this case Though I've had to do my own small part to show VB isn't slow like many seem to think, especially C programmers and Linux users. There are still some roaming around every now and then, but not that often. And actually, I'm not looking for them either. I did hear about those things but I weren't old enough to get into it. Besides had only VB4 at the time, which of course was the P-code hell.

  30. #30

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    Thought I'd put this thread back on top. See how many more people look!
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  31. #31
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Me! But only because it was in my userCP!

  32. #32
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by kfcSmitty
    I wanted to try the sudoku solver, but I don't udnerstand how the puzzels work, and I have no idea where to start....Damn me being a newbie
    Pleeease join the contest smitty? I thought the same thing, but then Lou offered me some help in this thread:

    http://www.vbforums.com/showthread.php?t=350314&page=3
    (Posts #84 and #95).

    And that made it all make sense and got me started. Then I went back and read the whole sudoky discussion thread and picked up a few more tips before starting my program. Now the discussion thread has a ton more tips and if you read if before you start you will have a leg up on most people.

    If you want some more help on understanding out it works let me know.

    I'm a noob, too (I think we started around the same time) and it has been an AWESOME learning experience.

    I'll PM you about this if I don't see a response in a day or so.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  33. #33
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    Then, for each revealed cell, delete all of that cells could be's, then place in it its must be.

    Then, for every cell in that mustbe's row, delete that must be from each of those cells,
    Ditto per column,
    Ditto for the actual 3x3 parent SQUARE.
    Oh god, Im 3 lines in and my head already hurts


    Can someone just explain in lamens terms the end result?

    IE) You need to fill all 9 squares, each with a different number........etc
    Last edited by kfcSmitty; Aug 16th, 2005 at 12:43 PM.

  34. #34
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Yr Wyddfa ?!!

    Oh, you mean basic basics. I would say read this:
    http://en.wikipedia.org/wiki/Sudoku

    ... but that is really confusing too. TIn the most basic terms you are trying to fill in each row with the numbers 1-9, each column with the numbers 1-9 and each 3x3 square of cells with the numbers 1-9. You can't have the same number twice in any row/column/group.

    That link I posted explains how to apply logic rules to your solver which help solve the puzzle.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  35. #35
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Yr Wyddfa ?!!

    Here is a sample:
    The top is the clues you are given to start and the bottom is the solver version of the puzzle. You can see that all the 8's are highlighted and that no 8 appears 2 times and any row/col/3x3 square.

    Make more sense?

    EDIT: Screen shots are thanks to Merri's solver.
    Attached Images Attached Images  
    Last edited by eyeRmonkey; Aug 16th, 2005 at 01:04 PM.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  36. #36
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: Yr Wyddfa ?!!

    well I understand how to solve it now! gawd damn :/

    Guess I'll start cracking at this tonight

  37. #37
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Yr Wyddfa ?!!

    Quote Originally Posted by kfcSmitty
    well I understand how to solve it now! gawd damn :/

    Guess I'll start cracking at this tonight
    Cool. If you get stuck on anything PM me or post somewhere and I will see what I can do. The more people who participate the better. The deadline is approaching fast, but don't worry about it, just get what you can done. Its worth it.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  38. #38

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Yr Wyddfa ?!!

    At the time of writing there has been 150 views.
    See if I can get you nosey gits to look here 200 times
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  39. #39
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Yr Wyddfa ?!!

    Go for it!

  40. #40
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Yr Wyddfa ?!!

    This is really weird. For ages i thought Merri was a chick, and now I find out that smitty is a chick! I thought smitty was a guy.

    You dudes really need to choose better avatars or something.

    Also, sudoku is the most boring subject in the known multiverse next to trainspotting, to quote visualDalek: "PLEASE POST IN THE CORRECT FORUM!!! EXTERMINATE!"

    Merri, ever think of turning your optimisations skills to a worthwhile project? Such as graphics programming (seriously).
    I don't live here any more.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width