How do I add lua extensions/libraries to the Ctrlr Lua version ?

Home Forums General Programming How do I add lua extensions/libraries to the Ctrlr Lua version ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #29505
    synth
    Participant
      • Topics: 13
      • Replies: 35
      • Total: 48

      Hi,

      Is it possible to add extensions to the Ctrlr Lua ? These can then be loaded using require()

      I was looking at the one mentioned here to pretty print tables : http://stackoverflow.com/questions/9168058/lua-beginner-table-dump-to-console

      and wondering if it can be added to the Ctrlr Lua.

      • This topic was modified 9 years, 7 months ago by synth. Reason: Added exmaple
      #29507
      atom
      Keymaster
        • Topics: 159
        • Replies: 2945
        • Total: 3104
        • ★★★★★

        If it’s pure Lua you can load it, if it needs compilation (C/C++) you need to recompile Ctrlr with that.

        #29554
        atom
        Keymaster
          • Topics: 159
          • Replies: 2945
          • Total: 3104
          • ★★★★★

          The package extension is now loaded in ctrlr. so you can call require() on external modules. i’m using that with Luasocket and seems to be working.

          #29559
          synth
          Participant
            • Topics: 13
            • Replies: 35
            • Total: 48

            Wow thanks atom 🙂 ! I ll test it out today.

            If I want to contribute to Ctrlr through C/C++ code and lua, then do I need to fork your repo in Github ? Then do commits in the fork and initiate pull requests for you ?

            #29573
            atom
            Keymaster
              • Topics: 159
              • Replies: 2945
              • Total: 3104
              • ★★★★★

              As you wish i added you (i think it was you?) as a contributor of the repo so you should be able to just commit to the repository.

              #29579
              synth
              Participant
                • Topics: 13
                • Replies: 35
                • Total: 48

                Yeah actually it was friend of mine. We are both using Ctrlr 🙂

                I ll send in a request too.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The forum ‘Programming’ is closed to new topics and replies.
              There is currently 0 users and 185 guests online
              No users are currently active
              Forum Statistics
              Threads: 2,495, Posts: 17,374, Members: 77,605
              Most users ever online was 12 on January 22, 2019 3:47 pm
              Ctrlr