• Dave B (unregistered)

    I am in awe, but for true wtfery he should have done it in wireworld '-)

  • (cs)

    Boo! This is not a true WTF!

    He should at the very least implement division using the other operations instead of the lame

    float DoDiv(float op1, float op2, int *isErr) { *isErr = 0; if(op2 == 0) { *isErr = 1; } return op1/op2; }

  • Annoying person (unregistered)

    Not first!!!

    Captcha: xevious - say what again???

  • SomeCoder (unregistered)

    This submission is one of those that is cool to play around with. The concept of implementing a virtual circuit in code is really interesting.

    It's practical applications though are none which makes this a WTF. At least it would if someone actually did this in the workplace.

  • (cs)

    Finally, clever code. This is one of only two or three of the finalists that I consider actually took the aim of the competition to heart ("first and foremost, Clever and, if desired, Buggy").

  • whicker (unregistered)

    I can kind of see emulators doing this sort of gate-level simulation. Especially when there's unintended ripple through all the combinatorial logic.

    Really the other thing is that this is an ideal design where results only appear when they're ready.

    I'd really like to have seen an outer Update( ) loop with a magic number of iterations needed to produce the output, and then somewhere have "accidentally" given it one less iteration.

  • Sven (unregistered)

    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P

  • (cs) in reply to Sven
    Sven:
    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P
    They must figure that if you are smart enough to use the scientific view, you are smart enough to know to click "x^y" and type in ".5" (or x^y, 2, 1/x, =)
  • Obviously Missing Something (unregistered)

    No square root button? Hmm. Maybe a square root isn't the Inverse of x^2 after all then...

  • w00t (unregistered) in reply to Sven
    Sven:
    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P

    True dat. Also, i find it quite hard to predict what it will do when you press enter, but maybe that's just me.. I much prefer the google (or, in a pinch, excel) way of just entering an expression as a line..

  • Skizz (unregistered) in reply to Sven
    Sven:
    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P
    Have you tried Inv-X^2? (i@)

    Skizz

  • (cs)

    (side note) Interesting article about improvements in Windows Calculator that nobody noticed:

    http://blogs.msdn.com/oldnewthing/archive/2004/05/25/141253.aspx

  • (cs) in reply to d++
    d++:
    Boo! This is not a true WTF!

    He should at the very least implement division using the other operations instead of the lame

    Did you read the documentation in the ZIP file? Since it is a documented feature, I would not consider it being lame.

    I am saddened by the fact that I never managed to get around to floating point calculations. As a result, the division function of the calculator does not utilize VICE
  • (cs) in reply to w00t
    w00t:
    Sven:
    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P

    True dat. Also, i find it quite hard to predict what it will do when you press enter, but maybe that's just me.. I much prefer the google (or, in a pinch, excel) way of just entering an expression as a line..

    That's why I ended up writing my math IRC bot. No matter where I am, I can log in and give it expressions to evaluate, and even define, store and retrieve variables from anywhere in the world! Context-free grammars FTW.

  • guest (unregistered)

    It's interesting that we didn't yet see any entry in the finals which is implemented for unix. Does it mean that they can't write wtfy code?

  • SomeCoder (unregistered) in reply to BradC
    BradC:
    (side note) Interesting article about improvements in Windows Calculator that nobody noticed:

    http://blogs.msdn.com/oldnewthing/archive/2004/05/25/141253.aspx

    I noticed. The real WTF is that they didn't write their own floating point software in the first place. If you're writing a calculator, the general public expects: 1.0 - .2 - .2 - .2 -.2 - .2 = 0

    If you use IEEE, you will get (using C++)

    0000000327826

    It's water under the bridge now and Windows calc is a great program with great accuracy but anytime you're going to write a commercial calculator, you have to be aware of those things.

  • Anonymus (unregistered)

    The Real WTF is that he didn't take the time to implement a Virtual Wooden Table (VWT).

  • bob the slob (unregistered)

    Performant isn't a word.

  • (cs) in reply to sirhegel
    sirhegel:
    d++:
    Boo! This is not a true WTF!

    He should at the very least implement division using the other operations instead of the lame

    Did you read the documentation in the ZIP file? Since it is a documented feature, I would not consider it being lame.

    I am saddened by the fact that I never managed to get around to floating point calculations. As a result, the division function of the calculator does not utilize VICE

    First, for those with browser that don't highlight <sarcasm> tags: this a great piece of software. So great that I do not find it a WTF.

    As for the division, the classic "subtract till done" algorithm should be enough and more consistent with the premise.

  • (cs)

    Uhm... seriously... unit test? Thats a wtf for me.

  • (cs) in reply to BradC
    BradC:
    (side note) Interesting article about improvements in Windows Calculator that nobody noticed:

    http://blogs.msdn.com/oldnewthing/archive/2004/05/25/141253.aspx

    From the comments on that page:

    I would guess they just want a calculator that works the way they expect it to - the same way their handheld calculator (no I don't mean Palm) works.
    Last time I checked handheld calculators only had 12 places of precision (and displayed 10). The example of 10.21-10.2 that throws Windows' Calc doesn't throw a handheld because it's BCD based, but handhelds still hate 1.0-1/3-1/3-1/3.

    You can prove the precision thing by doing 1/3 - 0.333333333 (as many threes as you can fit on the display). The result is going to be 3.3e-10. It should be 3.333333333e-10, in fact if you keep subtracting what you see on-screen then you should never get to an end (1/3 being infinitely repeating and all), but you will likely only see a couple of digits beyond what was originally displayed.

  • witfuck (unregistered) in reply to guest
    guest:
    It's interesting that we didn't yet see any entry in the finals which is implemented for unix. Does it mean that they can't write wtfy code?

    Did you fuckwit read the conditions of the contest? No self-respecting Unix programmer would join a contest under these conditons.

  • Frenchier than thou (unregistered) in reply to bob the slob
    bob the slob:
    Performant isn't a word.
    In French, it is.
  • (cs) in reply to bob the slob
    bob the slob:
    Performant isn't a word.
    Shut up, baby. Don't spoil the moment for us.
  • Look at me! I'm on the internets! (unregistered) in reply to Sven
    Sven:
    The biggest WTF is Windows Calculator itself: although it's a very powerful calculator with a very powerful infinite precision engine, it still doesn't have a sqrt button in the scientific view, a problem that has existed for God knows how many Windows versions, and still exists in Vista. :P

    Try inv x^2

  • Hit (unregistered) in reply to witfuck
    witfuck:
    guest:
    It's interesting that we didn't yet see any entry in the finals which is implemented for unix. Does it mean that they can't write wtfy code?

    Did you fuckwit read the conditions of the contest? No self-respecting Unix programmer would join a contest under these conditons.

    Then I guess the 150 or so entries that were written for unix were just a mirage. Or are you saying that those programmers have no self respect?

  • (cs) in reply to guest
    guest:
    It's interesting that we didn't yet see any entry in the finals which is implemented for unix. Does it mean that they can't write wtfy code?
    No. It means you are blind. Or that you didn't read all the finalists. Everyone else saw #03: The estimator.
  • whicker (unregistered) in reply to SomeCoder
    SomeCoder:
    BradC:
    (side note) Interesting article about improvements in Windows Calculator that nobody noticed:

    http://blogs.msdn.com/oldnewthing/archive/2004/05/25/141253.aspx

    I noticed. The real WTF is that they didn't write their own floating point software in the first place. If you're writing a calculator, the general public expects: 1.0 - .2 - .2 - .2 -.2 - .2 = 0

    If you use IEEE, you will get (using C++)

    0000000327826

    It's water under the bridge now and Windows calc is a great program with great accuracy but anytime you're going to write a commercial calculator, you have to be aware of those things.

    I agree with what you are saying, and would like to add something...

    There is no reason why that subtraction sequence above should not be exactly zero. A normal user is not wrong just because IEEE 754 can't represent a perfectly normal decimal number exactly.

  • AASoft (unregistered)

    Notice the size of the archive: 66.6

  • (cs) in reply to d++
    d++:
    Boo! This is not a true WTF!

    He should at the very least implement division using the other operations instead of the lame [code snipped]

    In my defense, I had planned to implement division, along with a whole lot more. Alas, I didn't have enough time. :(

  • (cs) in reply to AASoft
    AASoft:
    Notice the size of the archive: 66.6

    Does that mean I sold my soul to win the contest? I'm not sure my soul is worth a new laptop. :)

  • (cs)

    Wy not use those shiny multycore cpu's? Give each transistor it's own thread.

  • dkf (unregistered) in reply to floort
    floort:
    Wy not use those shiny multycore cpu's? Give each transistor it's own thread.
    I've done very close to that in production code. OK, they weren't real threads (I needed the ability to make them move backwards in time, and real threads are far too heavyweight) but even so, you can build some impressive circuits that way.

    I doubt this entry will win. If the entrant had created a VHDL engine and entered something with a circuit implemented using that, it would be a different story. (VHDL for a contest like this would be highly WTF-rated in an Enterprisey way!)

  • Frost Cat (unregistered) in reply to witfuck
    witfuck:
    guest:
    It's interesting that we didn't yet see any entry in the finals which is implemented for unix. Does it mean that they can't write wtfy code?

    Did you fuckwit read the conditions of the contest? No self-respecting Unix programmer would join a contest under these conditons.

    HAhahaah, that's funny, and clearly you've never worked at any Unix site that does, in fact, create massive WTFs.

  • (cs)

    Not sure if this was exactly what we envisaged - but this is soooooo cool. you, er, da man

  • david (unregistered) in reply to BradC

    or even [INV] [x^2] ...

  • Akerbos (unregistered)

    Did anyone try PowerToy Calc by MS? Powerful thing.

  • (cs)

    The pan-ultimate in NIH. The hardware wasn't invented here so we must create new hardware in software. Would be useful for unit testing your circuit boards before building them. While reading it, I couldn't help but think about how it integrated into a game, and actually felt like I was looking at portions of some game code I've been privy to peruse.

  • Purple Avenger (unregistered)

    The old NanoData QM-1 machine could emulate hardware at a pretty low level...using code (a 2-level microcode scheme). It was vertically and horizontally microprogrammable at the user level and designed to be an emulation machine.

  • DOA (unregistered)

    I kinda liked this one. While obviously a wtf for a calculator it sounds like something you'd tinker with on your spare time just for the perverse fun of it

  • (cs)

    LoL. It took someone pointing out this entry was from Nashville for me to notice who submitted it. I would have wished you GL Randolfo, but its already over. In case your wondering we used to work together.

  • (cs) in reply to bob the slob
    bob the slob:
    Performant isn't a word.

    Uhm... Sure it is. Or are you implying that English is a stagnant language?

  • ChrisH (unregistered)

    This is my winner. Very elegant and I really wish I'd thought if this myself.

    Now I've expressed my professional judgment, clearly it's time to pick some really divisive geek issue to fuel a flame war, you know... just to make the day go by.

  • maht (unregistered) in reply to Akerbos

    you windows weenies dont even know power

    man bc

  • Me (unregistered)

    If I understand correctly, this wouldn't be vulnerable to any e.g. FPU bugs?

Leave a comment on “OMGWTF Finalist #11: VICE, Virtual Integrated Circuit Engine”

Log In or post as a guest

Replying to comment #:

« Return to Article