• Shinobu (unregistered) in reply to BitDreamer
    BitDreamer:
    Yes it is. It is a "functional line". This is not the same as SLOC, which is how some programmers are paid.
    Looks more like a dysfunctional line to me. Also, => is a synonym for >= in most Basics (which is completely unrelated to the WTF, but people asked what language has a => operator so yeah) and Absolute Universal Time can't work because of relativity, sorry.
  • TheJonB (unregistered) in reply to Fred
    Fred:
    TheJonB:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!

    The only acceptable time format is clearly MM hh ss.

    So 30 6 10 reads "Thirty minutes past six and 10 seconds" like some Americans might say it.

    Nice one. Bet the yankees are really fuming now...

    Yeah, suck it up yankee pigs!

  • SeySayux (unregistered) in reply to Ken B.
    Ken B.:
    "Hey, Bob... Can you make a quick PHP script to convert times into more 'friendly' strings?"

    "How do I do that?"

    "I don't know... Try associative arrays."

    "I don't know anything about those."

    "Just copy US_state_list.php, and strip out everything between the first line with the open parenthesis and the line with the closing parenthesis, and fill in the times using the same style."

    It's sad because most likely it's true.

  • (cs) in reply to Shinobu
    Shinobu:
    Absolute Universal Time can't work because of relativity, sorry.
    Oh, it can work just fine. It's just that everyone in an inertial frame of reference gets their own personal Absolute Universal Time that's different from everyone else's. This is the whole point of Einstein's theory of Special Relativity. (General Relativity modifies SR to add gravitation, which has some subtle consequences.)

    This is supposed to make your head ache if you think about it too much.

  • (cs)

    Military time?

    The US military when implementing the GPS system insisted on having a software switch to be able to turn off the relativity correcting algorithms inside the satellites because they just couldn't believe this one guy (who apparently always put something into a wall socket prior to having his photo taken) who said that time would move slower inside those satellites once they had been launched. So don't talk to me about military time application, please...

  • (cs) in reply to dkf
    dkf:
    gravitation, which has some subtle consequences

    cf. Verrazano-Narrows Bridge. (Granted, it wasn't gravity that made it fail ...)

  • Meep (unregistered) in reply to Anketam
    Anketam:
    What programming language uses '=>'?

    Haskell does, to indicate context inheritance from class.

  • foo (unregistered) in reply to A Real Einstein
    A Real Einstein:
    Matt Westwood:
    big picture thinker:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

    A neat idea, but impossible to define with any degree of exactitude.

    FTFY
    FTFY

  • TheJonB (unregistered) in reply to oheso
    oheso:
    dkf:
    gravitation, which has some subtle consequences

    cf. Verrazano-Narrows Bridge. (Granted, it wasn't gravity that made it fail ...)

    Then what did make it fall?

    Is there some new gravity-like force we should be made aware of?

  • (cs) in reply to JiP
    JiP:
    ... they just couldn't believe this one guy (who apparently always put something into a wall socket prior to having his photo taken) ...

    What's that all about? Please explain.

    Or is it a reference to the frizziness of the hair of Einstein who first worked out most of this stuff?

  • (cs) in reply to lesle
    lesle:
    Noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.
    This is true only for the unmeasurable instant that is noon or midnight. But as soon as the lunch gong rings and our clock tells us it's 12:00, it's past that instant and into the PM. Your clock displays "12:00" for a full minute, and all 60 seconds of that minute are post the meridiem.
  • (cs) in reply to Matt Westwood
    Matt Westwood:
    JiP:
    ... they just couldn't believe this one guy (who apparently always put something into a wall socket prior to having his photo taken) ...

    What's that all about? Please explain.

    Or is it a reference to the frizziness of the hair of Einstein who first worked out most of this stuff?

    wow do you actually think, or are you upper management and have a secretary for that? :)

  • (cs) in reply to herby
    herby:
    trtrwtf:
    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    Sorry...

    I only deal with stardates. Ahead warp factor 4.

    This star-trek fixation is now cureable. Please visit doctor for mental analysis immediately.

  • wonk (unregistered) in reply to oheso
    oheso:
    dkf:
    gravitation, which has some subtle consequences

    cf. Verrazano-Narrows Bridge. (Granted, it wasn't gravity that made it fail ...)

    The Tacoma Narrows bridge may be a better example....

  • (cs) in reply to Stev
    Stev:
    TRWTF is that people don't get the 24hour clock. And no, it's not "Military time", the military just happens to use it.

    It is retarded military time when you call 14:00 "fourteenhundred", as if an hour has 100 minutes now!

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Please show a little sensitivity. I had a son who once included boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow, and let me assure you, it was no laughing matter.
    You retard are confusing me with Zunesis!
  • Jeff (unregistered) in reply to no laughing matter
    no laughing matter:
    It is retarded military time when you call 14:00 "fourteenhundred", as if an hour has 100 minutes now!
    What do you call it, "fourteen o'clock"?

    I call it "two P M" and I type "14:00".

    Because if you're speaking, there are probably mush-brained humans involved, but if you're dealing with a computer, there is only One True Date/Time Format.

  • TheJonB (unregistered) in reply to no laughing matter
    no laughing matter:
    Matt Westwood:
    Please show a little sensitivity. I had a son who once included boobies, bacon, Tim Tebow, unicorns, bears, beers, ponies, kittens, transvestites, hookers, and blow, and let me assure you, it was no laughing matter.
    You retard are confusing me with Zunesis!

    Please show some sensitivity. I had Zunesis once, and let me assure you it's no laughing matter.

  • (cs) in reply to Kevin S
    Kevin S:
    Don't you get it?

    If the date() function returns Wyoming, it will surely be the end of $times

    That was awesome :)

  • Joe (unregistered) in reply to Matt Westwood
    Matt Westwood:
    big picture thinker:
    trtrwtf:
    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    What is that, Planck Time units since the Planck Epoch?

    A neat idea, but difficult to calibrate with any degree of exactitude.

    No, it's relativitly simple.

    It's the distance between your position in spacetime and the 0,0,0,0 coordinate which is obviously the exact place and time where the big bang started.

    Since we all know that d=sqrt(x^2+y^2+z^2-t^2), all we have to do is convert it into planck lengths.

    To find where the big bang started, we simply locate the position in the universe where all spacetime is expanding away from, and that's the center. Just because I observe it to be the exact location I'm in merely reflects how important I am in the universe. Say, is anyone going to eat that fairy cake?

    --Joe

  • Jay (unregistered) in reply to trtrwtf
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    No, in a perfect universe, time is reckoned as "Wyoming" or "not Wyoming".

  • TheJonB (unregistered) in reply to Jay
    Jay:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    No, in a perfect universe, time is reckoned as "Wyoming" or "not Wyoming".

    A perfect universe wouldn't have Wyoming....

  • (cs) in reply to shoddycoder
    shoddycoder:
    Scala too:

    scala> def format(input: String) = input match { | case "12:00:00" => "12:00 pm" | case "18:30:00" => " 6:30 pm" | case "WTF" => "Wyoming" | } format: (input: String)java.lang.String

    scala>

    scala> println("12:00:00 -> " + format("12:00:00")) 12:00:00 -> 12:00 pm

    scala> println("WTF -> " + format("WTF")) WTF -> Wyoming

    That is only one example of what => can mean in Scala.

    In fact it can mean almost anything, including:

    Function Literal

    scala> var increase = (x: Int) => x + 1
    increase: (Int) => Int = <function>
    
    scala> increase(10)
    res0: Int = 11

    Function Literal that is a Closure

    scala> var more = 1
    more: Int = 1
    
    scala> val addMore = (x: Int) => x + more
    addMore: (Int) => Int = <function>
    
    scala> addMore(10)
    res19: Int = 11

    Type declaration of a function

    def filesMatching(query: String, 
             matcher: (String, String) => Boolean) = {
        for (file <- filesHere; if matcher(file.getName, query))
        yield file
    }

    Declaration of a By-Name-Parameter A normal function parameter is an expression that is evaluated before the function is called. A By-Name-Parameter is evaluated lazely, it is first evaluated when the parameter actually is used inside the function.

    var assertionsEnabled = true
    
    def byNameAssert(predicate: => Boolean) =
          if (assertionsEnabled && !predicate)
            throw new AssertionError
    
    byNameAssert(x / 0 == 0)

    blows ArithmeticException

    However same function:

    assertionsEnabled = false
    
    byNameAssert(x / 0 == 0)

    will not blow, as the expression containing the divie-by-zero never is evaluated.

    Renamed imports

    import java.sql.{Date => SDate}

    Excluded imports

    import Fruits.{Pear => _, _}

    This imports all members of Fruits except Pear.

    Pattern matching As already shown in the previous post.

    However there is more to it, you can use it with Extractors:

    object WTFBoolean {
      def unapply(f:String):Option[String] =
        if (f=="True" || f=="False" || f=="FileNotFound")
          Some(f)
        else None
    }
    
    // Prints "Boolean: FileNotFound!"
    "FileNotFound" match {
      case WTFBoolean(f) => println ("Boolean: " + f)
      case _ => println ("No")
    }
    // Prints "No"
    "true" match {
      case WTFBoolean(f) => println ("Boolean: " + f)
      case _ => println ("No")

    and on XML:

    def proc(node: scala.xml.Node): String =
        node match {
          case {contents} => "It's an a: "+ contents
          case {contents} => "It's a b: "+ contents
          case _ => "It's something else."
        }
  • Ol' Bob (unregistered) in reply to Todd Lewis
    Todd Lewis:
    $person_name:
    Give that coder a military programming contract. They're ready!

    Who's ready, the coder, or the military? (Actually, I don't want that code anywhere close to lethal weapons.)

    Let's play Global Thermonuclear War...

  • foo (unregistered) in reply to Kivi
    Kivi:
    lesle:
    Noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.
    This is true only for the unmeasurable instant that is noon or midnight. But as soon as the lunch gong rings and our clock tells us it's 12:00, it's past that instant and into the PM. Your clock displays "12:00" for a full minute, and all 60 seconds of that minute are post the meridiem.
    Except that it's 0 hours (and some seconds) past m., not 12 hours and something.

    Let's see, Indians invented the number 0 around the 9th century, and Americans still act as if it wasn't known. But keep on making your Nagesh jokes if that helps you feel superior ...

  • Ol' Bob (unregistered) in reply to cellocgw
    cellocgw:
    Bleat:
    I don't see the problem. I have to get up at the crack of Wyoming every day.

    "Wye Knot?"

    Y-Knot - http://srs.linvatec.com/SRS_instability_Yknot.php

  • Ol' Bob (unregistered) in reply to Fred
    Fred:
    TheJonB:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!

    The only acceptable time format is clearly MM hh ss.

    So 30 6 10 reads "Thirty minutes past six and 10 seconds" like some Americans might say it.

    Nice one. Bet the yankees are really fuming now...

    Nah...but the Mets are pretty riled up...

  • Ol' Bob (unregistered) in reply to Jay
    Jay:
    Niel:
    Don't be so sure. We've had spacecraft on, orbiting or visiting our moon, several planets, and even moons of other planets for decades now. And it does get a little weird scheduling mission events in Earth-centric time.

    But the people who control those flights live on Earth, and Earth time is surely more convenient for them to operate by.

    To date the only manned spaceflights to go further than a few miles up have been six Apollo missions to the Moon. I'm not sure how many people have lived since the first flight to the Moon, but as the present population is about 6 billion, it's at least that many. I think it's a little premature to completely revamp all of our timekeeping to accomodate 18 people out of 6 billion. Especially considering those 18 all spent only a tiny fraction of their lives away from the Earth.

    When we get to the point where we have a permanent base or colony on another planet, then we'll need a more general time-keeping system. Not to be pessimistic, but at the rate we're going, I think we have plenty of time to plan for that.

    Yeah - and that's going to happen...when? Hmmm...let me see...I was in grade school when the first moon landing occurred...I was in high school when the last moon landing occurred...gonna retire in about 10 years or so...I'd say...just a guess here...it'll happen...hmmm...from my point of view...uh...NEVER!!!!!!!!!

  • Jani (unregistered)

    Well, its obvious that it's missing something... "FNF" => "File Not Found"

  • Larry (unregistered) in reply to foo
    foo:
    Let's see, Indians invented the number 0 around the 9th century, and Americans still act as if it wasn't known. But keep on making your Nagesh jokes if that helps you feel superior ...
    That's because we're waiting for an American to invent a zero, at which point it will be a superior zero, one that is worthy of our notice.

    (So how do you invent a zero, anyway? "Hey look everyone, I made a zero!" "What, where, I can't see it?" "That's because it's nothing." "But you invented it?" "Yeah!" "Uhhh...")

  • Evan (unregistered) in reply to John
    John:
    TRWTF is Americans don't understand the 24 hour clock while the rest of the world does.
    Look, I'm an American. I have all my clocks (that can be) set to 24-hour time. Mostly because I got tired of setting my alarm for 7:00 and having it go off just after dinner.

    But even I have been to Europe, and even I know that AM/PM is still prevalent there. Especially in the UK. Yes, there are a lot of places that use 24-hr time, far more than in the US, but a lot don't.

    So don't go acting high and mighty that you're using the One True System, because even "you" aren't consistent about it.

  • (cs) in reply to Jay
    Jay:
    trtrwtf:
    Jeff:
    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Damn straight. In a perfect universe, time is reckoned by Absolute Universal Time.

    No, in a perfect universe, time is reckoned as "Wyoming" or "not Wyoming".

    You forgot "Wyoming not found".

  • (cs) in reply to no laughing matter
    no laughing matter:
    Stev:
    TRWTF is that people don't get the 24hour clock. And no, it's not "Military time", the military just happens to use it.

    It is retarded military time when you call 14:00 "fourteenhundred", as if an hour has 100 minutes now!

    An hour should have 100 minutes, each having 100 seconds. The military is just ahead of everyone else.

  • Dirk (unregistered)

    Welcome to the every other daily WTF

  • (cs) in reply to KattMan
    KattMan:
    Matt Westwood:
    JiP:
    ... they just couldn't believe this one guy (who apparently always put something into a wall socket prior to having his photo taken) ...

    What's that all about? Please explain.

    Or is it a reference to the frizziness of the hair of Einstein who first worked out most of this stuff?

    wow do you actually think, or are you upper management and have a secretary for that? :)

    No, I genuinely want to know why someone would want to put something in a wall socket prior to having his photo taken. In short, I don't get the fucking joke, you shitfucker.

  • int (unregistered)

    Looks like in WY day starts at noon and lasts only 6 and half and hour. Poor people.

  • Brendan (unregistered) in reply to PedanticCurmudgeon

    [quote user="PedanticCurmudgeon"][/quote]Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.[/quote]

    Surely a sane person would just write "18:26:00" instead.

  • William F (unregistered)

    everyone knows 24 hour time is the better system, there is no need for the AM/PM indicator, 0 is midnight 12 is midday and hence no confusion

    when i can i prefer my clocks 24 hour, i just wish New Zealand TV stations would switch to 24 hour for there programming, they say the time but dont say if its AM or PM, 24 hour would remove the confusion in that respect

  • John (unregistered) in reply to Evan

    I've been living for years in continental Europe (Western Europe that is) and I never see AM/PM used. Same thing when I travel in the Middle East and S.E. Asia. Sometimes people will casually talk about 5 o'clock when meaning 17H00 for instance but never adding PM and often rephrasing the time as 17H. It's a bit like the metric system. The only holdouts clinging to imperial are the USA, Liberia and Myanmar (Burma)whilst the rest of the world has moved on to metric.

  • (cs) in reply to Niel
    Niel:
    Coyne:
    Jeff:
    PedanticCurmudgeon:
    Ralph:
    "18:30:00" => " 6:30 pm"
    So this creature is taking a correctly formatted time and mangling it into some abomination? Let the date/time format wars begin! Kill! Kill!! Kill!!!
    Well, for starters, the one true date/time format includes a time zone offset, for example 18:30:00-04:00.
    In a perfect world, there are no time zones.

    Wait, let me back up a step.

    In a perfect universe, time is not reckoned by the slightly erratic movements of one particular rock among billions and billions of stars.

    Well, maybe. But it's the only rock we have.

    Don't be so sure. We've had spacecraft on, orbiting or visiting our moon, several planets, and even moons of other planets for decades now. And it does get a little weird scheduling mission events in Earth-centric time.

    Just for fun, why don't you write a quick "Phobos time zone" conversion module?

    Oh, yes, it is hard to do those conversions. But that would be true no matter what kind of time scale we used, because any time scale you can develop is only good in one frame of reference.

    So we could change the definition to (borrowing Wikipedia), "the duration of 10,000,000,000 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom."

    That wouldn't correspond with Earth's rotation ... or anything else, either. And it would probably result in a different interval on the Sun or Jupiter (due to the higher gravity changing the speed of light) and on spacecraft due to their speed of motion.

    That's why it is silly that they were just discussing doing away with leap seconds. If we go to a strict second count, then pretty soon (cosmic scale) everyone will be complaining because noon really isn't noon anymore, since the Sun will be rising along about 12:00:00. Or else you'll have to look at some stupid table computed by someone to find out that "high noon" is actually at 18:22:31 local time.

    So someone might suggest we use two time scales based on second count and a second time based on Earth's rotation, and...we'll be back to tracking leap seconds again. Or maybe we'll go to leap hours or leap days...and guess how that will screw up the program conversions (given that no one will test the programs for something that won't happen until ... "the end of the century").

    (Some programmers can't get leap year right, even after we just went through Y2K; and leap year happens every 4 years. And this was at Microsoft!)

    Time is truly relative--Einstein showed that--and will always be a pain, no matter the basis or intervals used.

  • (cs) in reply to dkf
    dkf:
    ...everyone in an inertial frame of reference gets their own personal Absolute Universal Time that's different from everyone else's.

    Then it's not Absolute then, is it?

    dkf:
    This is supposed to make your head ache if you think about it too much.
    Why? The notion of Absolute Space was discarded centuries ago and people coped pretty well with the results. Why should discarding Absolute Time be a problem?
  • (cs) in reply to Coyne
    Coyne:
    ... And it would probably result in a different interval on the Sun or Jupiter (due to the higher gravity changing the speed of light) ...

    I suspect this is a case of a certain person completely misunderstanding the Special Theory of Relativity.

    Nearly as bad as someone I recently saw declaiming that because of time dilation, developing a star drive based on the concept of travelling at speeds just-sub-light is a pointless waste of time because "you would age thousands of years on the spaceship for every minute in the outside universe."

    With such misunderstanding of basic physics as this in the general population, it's more profitable to argue against creationism.

  • L. (unregistered) in reply to Gurth
    Gurth:
    TheJonB:
    The only acceptable time format is clearly MM hh ss.
    Or by application of slightly different logic: MM:ss, h.

    30:10, 6: thirty and ten seconds, six o'clock.

    You amateurs ....

    The best format is and always will be MhsshM . and it's a palindrome !

    310680 : WTF it's six thirty PM and I'm still at work posting on tdwtf?

  • L. (unregistered) in reply to dfhaer
    dfhaer:
    eric76:
    Agention:
    lesle:
    Those of us weaned before the advent of computers learned, archaically, that noon is 12 m., midnight is 12 p.m., and there's no such time as 12 a.m.

    And now you're wrong, per common (and NIST) convention, and do nothing but to sow confusion amongst all.

    Citations, please.

    From http://physics.nist.gov/News/Releases/questions.html:

    Are noon and midnight 12 a.m. or 12 p.m.?

    This is perhaps the trickiest time question of them all. The best answer is that the terms 12 a.m. and 12 p.m. cause confusion and should not be used.

    To illustrate this, consider that "a.m." and "p.m." are abbreviations for "ante meridiem" and "post meridiem." They mean "before noon" and "after noon," respectively. Of course, noon is neither before nor after noon; it is simply noon. Therefore, neither the "a.m." nor "p.m." designation is correct. On the other hand, midnight is both 12 hours before noon and 12 hours after noon. Therefore, either 12 a.m. or 12 p.m. could work as a designation for midnight, but both would be ambiguous.

    To get around the problem, the terms 12 noon and 12 midnight should be used instead of 12 a.m. and 12 p.m. For example, a bank might be open on Saturday from 8 a.m. to noon. Or, a grocery store might be open daily until midnight. If you are making schedules, times such as 12:01 a.m. (one minute after midnight), or 11:59 p.m. (one minute before midnight) also can eliminate ambiguity. This method is used by the railroads and airlines.

    I reckon he means ytou're wrong saying there is no 12AM, when what you quoted (fairly clearly) explains that 12AM = 12PM = MIDNIGHT

    Man, the day I read so much confusion and controversy about the normal standard 24 hour time ... l m f a o

    And yet, people seem to think AM/PM is not retarded... Two girls one stick of butter really ;)

  • L. (unregistered) in reply to no laughing matter
    no laughing matter:
    shoddycoder:
    Scala too:

    scala> def format(input: String) = input match { | case "12:00:00" => "12:00 pm" | case "18:30:00" => " 6:30 pm" | case "WTF" => "Wyoming" | } format: (input: String)java.lang.String

    scala>

    scala> println("12:00:00 -> " + format("12:00:00")) 12:00:00 -> 12:00 pm

    scala> println("WTF -> " + format("WTF")) WTF -> Wyoming

    That is only one example of what => can mean in Scala.

    In fact it can mean almost anything, including:

    Function Literal

    scala> var increase = (x: Int) => x + 1
    increase: (Int) => Int = <function>
    
    scala> increase(10)
    res0: Int = 11

    Function Literal that is a Closure

    scala> var more = 1
    more: Int = 1
    
    scala> val addMore = (x: Int) => x + more
    addMore: (Int) => Int = <function>
    
    scala> addMore(10)
    res19: Int = 11

    Type declaration of a function

    def filesMatching(query: String, 
             matcher: (String, String) => Boolean) = {
        for (file <- filesHere; if matcher(file.getName, query))
        yield file
    }

    Declaration of a By-Name-Parameter A normal function parameter is an expression that is evaluated before the function is called. A By-Name-Parameter is evaluated lazely, it is first evaluated when the parameter actually is used inside the function.

    var assertionsEnabled = true
    
    def byNameAssert(predicate: => Boolean) =
          if (assertionsEnabled && !predicate)
            throw new AssertionError
    
    byNameAssert(x / 0 == 0)

    blows ArithmeticException

    However same function:

    assertionsEnabled = false
    
    byNameAssert(x / 0 == 0)

    will not blow, as the expression containing the divie-by-zero never is evaluated.

    Renamed imports

    import java.sql.{Date => SDate}

    Excluded imports

    import Fruits.{Pear => _, _}

    This imports all members of Fruits except Pear.

    Pattern matching As already shown in the previous post.

    However there is more to it, you can use it with Extractors:

    object WTFBoolean {
      def unapply(f:String):Option[String] =
        if (f=="True" || f=="False" || f=="FileNotFound")
          Some(f)
        else None
    }
    
    // Prints "Boolean: FileNotFound!"
    "FileNotFound" match {
      case WTFBoolean(f) => println ("Boolean: " + f)
      case _ => println ("No")
    }
    // Prints "No"
    "true" match {
      case WTFBoolean(f) => println ("Boolean: " + f)
      case _ => println ("No")

    and on XML:

    def proc(node: scala.xml.Node): String =
        node match {
          case {contents} => "It's an a: "+ contents
          case {contents} => "It's a b: "+ contents
          case _ => "It's something else."
        }

    Errr.. Scala trwtf ?

  • L. (unregistered) in reply to Evan
    Evan:
    John:
    TRWTF is Americans don't understand the 24 hour clock while the rest of the world does.
    Look, I'm an American. I have all my clocks (that can be) set to 24-hour time. Mostly because I got tired of setting my alarm for 7:00 and having it go off just after dinner.

    But even I have been to Europe, and even I know that AM/PM is still prevalent there. Especially in the UK. Yes, there are a lot of places that use 24-hr time, far more than in the US, but a lot don't.

    So don't go acting high and mighty that you're using the One True System, because even "you" aren't consistent about it.

    No ? UK+ USA = 5% of the world - i .e. nobody.

    And please don't count the UK as a part of Europe, they're merely geographically close to us that's all.

  • Hmmmm (unregistered) in reply to QJo
    QJo:
    Coyne:
    ... And it would probably result in a different interval on the Sun or Jupiter (due to the higher gravity changing the speed of light) ...

    I suspect this is a case of a certain person completely misunderstanding the Special Theory of Relativity.

    Nearly as bad as someone I recently saw declaiming that because of time dilation, developing a star drive based on the concept of travelling at speeds just-sub-light is a pointless waste of time because "you would age thousands of years on the spaceship for every minute in the outside universe."

    With such misunderstanding of basic physics as this in the general population, it's more desirable to argue for euthanasia.

    FTFY

  • Qilphil (unregistered)

    Not to invalidate the whole WTF, but as an ex PHP-programmer I can actually see myself writing code like this.

    Let's put on our thinking cap and see what we can deduce about the usage of the oh-so-terrible SLOC:

    • this looks like the input array to the php-function strtr() which will take a source string an a hash translation table and then find and replace every occurence of the key string to one of the value string in the hash.

    • it's not a matter of time conversion. These are singular points in daytime hours which are mapped to a more American-friendly format. First isolating those timestrings, parsing and then reformating them to am/pm format would be overkill.

    • since this replacement is probably done on a regular basis to textual data from an (assumed) external source it would an obvious place to add additional corrections to prefered ways to spell frequently occurring words ("WY" to "Wyoming")

    • don't ask me what the "" => "" is about, but since it will not change the result of the string-translation, it's not a bug but just left in there to facilitate adding more on-the-fly corrections

    I hazard a guess that the script is pulling some kind of external time schedule from an RSS for example and then applies the string translation to make the timetable look more like some PHB expects it to look.

    been there, done that, doesn't weight on my programmers conscience.

  • (cs) in reply to wbrianwhite
    wbrianwhite:
    no laughing matter:
    Stev:
    TRWTF is that people don't get the 24hour clock. And no, it's not "Military time", the military just happens to use it.

    It is retarded military time when you call 14:00 "fourteenhundred", as if an hour has 100 minutes now!

    An hour should have 100 minutes, each having 100 seconds. The military is just ahead of everyone else.

    Not if they're taking forty seconds longer than everyone else to get through each minute and forty minutes longer on each hour.

  • (cs) in reply to Watson
    Watson:
    Not if they're taking forty seconds longer than everyone else to get through each minute and forty minutes longer on each hour.

    No, thier seconds and minutes are just shorter. Kinda like the equivilant New York minute, or are those longer, I can never remember.

Leave a comment on “Wyoming O'Clock”

Log In or post as a guest

Replying to comment #:

« Return to Article