techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.9K
active users

#lua

13 posts10 participants1 post today

「 Pallene is a statically typed and ahead-of-time compiled sister language to Lua, with a focus on performance. It is intended for writing performance sensitive code that interacts with Lua, a space that is currently filled by C modules and by LuaJIT. Compared to C, Pallene should offer better support for interacting with Lua data types, bypassing the unfriendly syntax and performance overhead of the Lua-C API 」

github.com/pallene-lang/pallen

Pallene Compiler. Contribute to pallene-lang/pallene development by creating an account on GitHub.
GitHubGitHub - pallene-lang/pallene: Pallene CompilerPallene Compiler. Contribute to pallene-lang/pallene development by creating an account on GitHub.

✨ Descubra os Segredos da Lua com o Blue Ghost!
📝 O Blue Ghost, uma inovadora missão espacial, está medindo campos elétricos e magnéticos na Lua, revelando segredos ocultos e preparando o caminho para futuras explorações. O que esses dados podem nos ensinar sobre o nosso satélite e o universo? Clique e descubra tudo sobre essa emocionante jornada lunar!
.
.
.#SpaceExploration #Lua #Ciência
inkdesign.com.br/blue-ghost-me

Blue Ghost mede campos elétricos e magnéticos na Lua
INK|DESIGN NEWS · Blue Ghost mede campos elétricos e magnéticos na LuaBy Tiago F Santiago

I'm on a bit of a roll lately, and have released #iocaine version 2.4.0 just a few moments ago.

This does not bring that many significant changes as 2.3.0 did, but it does introduce #Lua and #Fennel as languages you can script its decision making with, on top of #Roto, which was introduced in 2.2.0.

While these languages run slower than Roto, they're still very fast, and are not going to be a bottleneck - they do provide a more familiar language to write the decision making in!

Oh, and metrics can now be persisted across restarts.

git.madhouse-project.orgCookie monster!
Continued thread

In other #iocaine news, I'm doing some final polishing on #Lua scripting support, to make it as convenient as #Roto.

Right now, there's a differenc between how Lua and Roto scripts are loaded: with Roto, one needs to give a path to a directory, and pkg.roto will be loaded from there, and any imports will be relative to that directory.

With Lua, one gives iocaine a file path, and - currently - needs to set up the package.path search path manually.

So here's what I'll do: I'll make iocaine require a directory for Lua too, and it will add it to package.path, and will require("main"). The required module will also have to return a table with at least a decide key, and an optional run_tests key. This will simplify finding the functions to run, and will greatly reduce the number of special cases.

While it has its own issues, there are several good reasons why my favourite #ProgrammingLanguage in the real world is #C

Why not #Go?
Because it's from #Google.

Why not #Csharp or #Fsharp?
#Microsoft.

Why not #Rust or #Zig?
#LLVM (aka #Apple & friends).

Ultimately, most of languages I avoid like the plague are controlled by #BigTech one way or another.

C is simple enough to get several alternative compilers based on useful standards.² ³


¹ In theory I still prefer #Oberon07, but when I want to code something useful I still use C instead to lower the entry barrier for other devs, because there are too many incompatible implementations of the compiler and "standard" library.

² Ok, #Python, #Scheme and #Lua have similar qualities, but for the tools I write I usually prefer binary executables with no runtime.

³ No, #C++ is not an option. 😉
harmful.cat-v.orgBjarne Stroustrup: "I Did It For You All..."

Today, I'm writing tests. Originally, I planned to write a bunch of tests in Rust to exercise the request handlers, but that felt like a huge pain in the backside, and would've involved a lot of repetition and boilerplate.

Then, I figured: I'll write the tests in #Roto and #Lua! Test the things from that side. Much less boilerplate, but still a lot of repetition.

Instead, I'll be writing a test suite to verify the decisions of a request handler. I'll run it for both engines, #Roto and #Lua. I will still have to write the scripts twice, but I will only write the verification once.

🖥️ My ultra-budget server powering websysctl.alfonsosiciliano.net has been running smoothly for the past 2 months. So far, so good!

📈 #Crawlers hit tens of thousands of sysctl parameter pages daily. That's fine, since robots.txt allows it. But why keep requesting non-existent pages as if the site were built with WordPress 😤 ? Fortunately, the stack (#FreeBSD :freebsd: + #OpenResty 🌐 + #Lapis ✏️ + a custom-built #database 📦 ) stays well within the limited resources of my $5/month cloud server.

The code might soon be #OpenSource stay tuned!

#UNIX#sysctl#WebDev

The @ardour #Lua scripting workshop at #LAC25 #INSA #Lyon has just started. And I am curious to learn how to extend the functionalities of this great free and #OpenSource #DAW in a programmatically way in #realtime.

As @lualang is #CrossPlatform like #Ardour is, you can draft your script on a Windows machine at work and refine it on your #Linux computer later at home, for example.

Let's see how we can automate tasks in Ardour sessions, which otherwise would require another person operating #plugin parameters, session properties, #routing, etc. interactively.

Continued thread

Unfortunately, there are gotchas there, too.

(fn decide [request]
  Outcome.not_for_us)

This #fennel code compiles to the following #lua:

local function decide(request)
  return Outcome.not_for_us
end
return decide

The problem here is that I'm not require-ing this file. I maybe should. Without require, that return makes little sense, and the decide function won't be found in the global scope, so...

Error: error converting Lua nil to function

Which makes perfect sense. Except the error message is bad, and needs to be improved.