m5l.eu is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Site description
Yet another single-user instance
Admin account
@marek@m5l.eu

Search results for tag #lua

[?]KaiXin »
@kaixin@snac.bsd.cafe

Hey fedi friends, what are the differences in USES and config options listed at #freshports for a ? I am familiar with USE in , which seem to be the config options here? For it is very common to use different USE settings for a packages, but for I read from porter's handbook there are not many USE items and they looked different from the term in . I am still trying to wrap my head around what is happening that whenever I try to build a port, like or in tiny flavors, I constantly noticed and all other seemingly unrelated stuff get pulled in.

    AodeRelay boosted

    [?]Frank »
    @fsx@exquisite.social

    Lately I've been working with Lua, but I'm not as familiar with it as Go. Anyone knows good articles on using the C api or Lua in general?

      [?]Alfonso Siciliano »
      @alfonsosiciliano@mastodon.bsd.cafe

      Weekend goal: a chunk (script) to help sighted users review . It's a great way to understand how visually impaired users interact with a computer using a screen reader and a Braille display. The script is simple and easy to configure. Currently, it offers a learning mode; in the future, a challenge mode will be added, along with a blog post explaining how to set it up.

      Link: gitlab.com/-/snippets/4858299

      On it should be executable via flua:
      % flua learnbraille.lua

      after installing liblouis:
      # pkg install liblouis

      Terminal screenshot of a Lua script called learnbraille.lua running on FreeBSD. The script is titled "LearnBraille 0.0.1" and uses a Braille conversion table. It quizzes the user with Braille character patterns and expects input of the corresponding character. The session shows a sequence of questions with user responses and feedback indicating whether the answer was correct or not. The script is launched using the command lua54 learnbraille.lua.

      Alt...Terminal screenshot of a Lua script called learnbraille.lua running on FreeBSD. The script is titled "LearnBraille 0.0.1" and uses a Braille conversion table. It quizzes the user with Braille character patterns and expects input of the corresponding character. The session shows a sequence of questions with user responses and feedback indicating whether the answer was correct or not. The script is launched using the command lua54 learnbraille.lua.

        [?]Zef Hemel »
        @zef@hachyderm.io

        [?]Zef Hemel »
        @zef@hachyderm.io

        Some thoughts on what makes special in my mind:

        1. The language is small and easy to learn. If you know any other procedural language, you will pick it up in a few hours tops.

        2. Since Lua is designed to be embedded in an existing application, it doesn’t come with a huge general purpose library you have to learn. Like (1) lowering the barrier to entry.

        3. This context suits a dynamic language very well. Little ceremony. Code that is straight to the point.

        4. Cultural observation: since Lua is often used in more “casual” programming settings (game development, editor customization, environment tweaking) with relatively low stakes, practices that “proper” software engineering practice would oppose, become acceptable for convenience and productivity. Global variables? YOLO. Unit tests? Nah. Just get shit done.

          SilverBullet boosted

          [?]Zef Hemel »
          @zef@hachyderm.io

          Ok. Day one of using @silverbulletmd in mode lead to already fixing some ugly UI glitches. Now thinking how to expand APIs to define Vim commands, bindings and other things. Also a reason to dive a bit deeper into @neovim which leans heavily on Lua. Also an interesting source of inspiration for Lua API design potentially.

            SilverBullet boosted

            [?]Zef Hemel »
            @zef@hachyderm.io

            Ok, so I’m now a few months into building a custom (almost from scratch) implementation for @silverbulletmd dubbed (for reasons).

            A few things that panned out really well, and a few surprises that I did not anticipate:

            0. General recommendation: don’t do this. Don’t just implement a full programming language because you think it’s a good idea. I also told this myself. It didn’t work. It was a “I’ve don’t this stuff before, I can do it again” type of deal. I was mostly right. But don’t do this.

            1. Initially I opted for a custom interpreter (implemented in TypeScript) because I wanted to expose asynchronous (promise based) JS APIs to Lua, and I didn’t see how to do that nicely with a -compiled version of the official Lua interpreter. Also I felt that having full control of the running system would turn out to be valuable down the line (I was right on this one).

            2. I got the parser part mostly free. I found an existing Lua grammar for the Lezer parser library that uses. Had to add a few things and had some struggles. This part was pretty seamless with a few glitches here and there.

            3. Implementing the core interpreter runtime was actually quite easy. Lua is a mostly simple and small language. Again, I’ve done this before so that helped. Writing good test suites makes this doable and AI helped a lot generating those test suites (because it knows Lua).

            4. What I didn’t anticipate is the pain in implementing the full Lua API, especially the `string.*` one which has its own pattern matching language (similar but distinct from regular expressions), which honestly I could do without. But it’s there, and people want to use it, so I need a full implementation. Issues keep coming up, though.

              1 ★ 1 ↺
              SilverBullet boosted

              [?]Marek S. Ł. »
              @marek@m5l.eu

              Today I was playing with in @silverbulletmd@fosstodon.org, and while upstreaming a fix for a dependency, I landed PR number 1 there.

              This is what promises to be, and it does feel nice to actually do it.