ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Palindrome Checking with Lua

    Developer Discussion
    lua challenges
    3
    8
    2.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tonyshowoffT
      tonyshowoff
      last edited by

      @scottalanmiller suggested, nay demanded, a new tradition be started of writing palindrome checkers in various languages, here's the thread:

      http://mangolassi.it/topic/3833/palindrome-checking-with-php

      Here is Lua:

      io.write("Your palindrome is: ")
      pal=io.read()
      if pal == string.reverse(pal) then
      	print("It's good.");
      else
      	print("Fail");
      end
      
      1 Reply Last reply Reply Quote 2
      • scottalanmillerS
        scottalanmiller
        last edited by

        Nice, thanks.

        tonyshowoffT 1 Reply Last reply Reply Quote 0
        • tonyshowoffT
          tonyshowoff @scottalanmiller
          last edited by

          @scottalanmiller Are we a Lua fan or was that some sort of erotic thing I inadvertently took part in? 😛

          1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller
            last edited by

            Never worked with Lua, wanted to see it in action 🙂

            1 Reply Last reply Reply Quote 1
            • JaredBuschJ
              JaredBusch
              last edited by

              Lua is a nice language to work in.

              I use it with the EverQuest emulator project I sometimes participate in developing for.

              One of the main devs on the project implemented Lua a couple years ago and I like it a LOT better than the way Perl was implemented for the project.

              tonyshowoffT 1 Reply Last reply Reply Quote 1
              • tonyshowoffT
                tonyshowoff @JaredBusch
                last edited by

                @JaredBusch It reminds me a lot of Java meets BASIC, with a dash of Pascal. It's not a bad language, but I prefer C-style languages, my brain just works better with them. Lua is a decent language though.

                scottalanmillerS 1 Reply Last reply Reply Quote 1
                • JaredBuschJ
                  JaredBusch
                  last edited by

                  Here is an example from the EQEmu project quest files

                  https://code.google.com/p/projecteqquests/source/browse/trunk/quests/potimeb/zone_status.lua?spec=svn1701&r=1701

                  1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @tonyshowoff
                    last edited by

                    @tonyshowoff said:

                    @JaredBusch It reminds me a lot of Java meets BASIC, with a dash of Pascal. It's not a bad language, but I prefer C-style languages, my brain just works better with them. Lua is a decent language though.

                    I'm the same way, C-style works with my brain.

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    • First post
                      Last post