adamnejm

joined 2 years ago
MODERATOR OF
lua
[–] adamnejm@programming.dev 6 points 5 months ago (2 children)
  • Sokoban
  • Atomas
  • Magic Survival
  • Mindustry
  • Terraria
[–] adamnejm@programming.dev 4 points 6 months ago (1 children)

I'm probably gonna switch from Codeberg, I just can't rely on a service that's down all the time or takes literal minutes to load a repo page.

[–] adamnejm@programming.dev 2 points 6 months ago

Still no per monitor workspaces :/

[–] adamnejm@programming.dev 1 points 6 months ago

I've been using Codeberg for a while now, however their servers are not always up to par. I've been in situations where it takes forever to load content of the code base via their website, pushing to a repo was also really slow, upwards of 30 seconds.

I know they've been DDOS'd a while back, but this was about a week ago and lasted for few days.

[–] adamnejm@programming.dev 5 points 10 months ago (1 children)

Found the Windows user. On Linux we actually have polkit that can elevate privileges with a GUI prompt.

[–] adamnejm@programming.dev -1 points 11 months ago
[–] adamnejm@programming.dev 22 points 11 months ago (1 children)

2029: EU proposes to criminalize the use of mathematics.

[–] adamnejm@programming.dev 4 points 11 months ago (1 children)

Working on your yt-dlp wrapper I see, nice. Keep up the good work!

[–] adamnejm@programming.dev 9 points 1 year ago (7 children)

If Linux suddenly started gaining traction on a bigger scale, Microsoft would make a user-facing proprietary distro and those bastards would still flock to it.

[–] adamnejm@programming.dev 5 points 1 year ago

First saying that tabs are a no go, then proceeding to deliberate on the correct amount of spaces...

Long live tabs!

[–] adamnejm@programming.dev 4 points 1 year ago (1 children)

Nice, used to love playing with p5 back in the day, good to have such tools for Lua which is often recommend as a beginner language.

I wish the author did implement some built-in libraries like middleclass, that would allow people that don't necessarily understand how metatables to fake classes in more elaborate ways than what's showcased in the instances.lua example.

[–] adamnejm@programming.dev 250 points 1 year ago (14 children)

Fuck subscriptions

Step 2:

Buy a subscription

 

Lazy is a library that extends the standard Lua library.
It exposes function modules such as math, string, table, etc.

It's aimed to fill the gaps of Lua's standard libraries by providing functions such as math.round to round numbers, string.trim to remove leading and trailing white spaces from a string and many many many more.

One important feature of Lazy is that the require path of modules is automatically resolved, which allows you to require the lazy library from virtually anywhere.
For example the lazy folder may be located in the root of your project or any sub-directory. More so, upon setting your LUA_PATH correctly, lazy can be required anywhere from your PC without having to import it into your project. Please refer to the GitLab page for more information .


Example usage:

local lazy = require "lazy"

lazy.math.round(1234.5678, 2) --> 1234.57
lazy.os.capture("pwd") --> /home/name/projects/lua/lazy
lazy.string.split("Lua is amazing!", " ") --> { "Lua", "is", "amazing!" }
lazy.table.append({ "A" }, { "B" }, { "C" }, { "D" }) --> { "A", "B", "C", "D" }

Contributions and requests are welcome :P

2
submitted 2 years ago* (last edited 2 years ago) by adamnejm@programming.dev to c/lua@programming.dev
 

All the rules from this Lemmy instance apply.
Additionally, please try to follow these community-specific rules:

Rules

1. Posts must relate to Lua

All posts must be related to the Lua programming language.
This also includes related and derivative projects, such as Luau or MoonScript.

2. Use descriptive titles

Your title should in short describe the contents. That applies to all kinds of posts, no matter whether you're showcasing a project, discussing a feature or asking for help.

Examples of bad titles:

  • please help!
    ^ Doesn't provide any information about the post
  • How to rotate SENT?
    ^ Should also information about API and ideally expand SENT which is a rather niche acronym
  • request.lua
    ^ Could provide a short description of the library

Examples of good titles:

  • [Help] Lua errors when using string.format with the %p flag
  • How to rotate a Scripted Entity in Garry's Mod when spawned?
  • request.lua - Lua >=5.1 library to simplify HTTP requests

Please note that there are no strict rules related to tagging posts (eg. including [Help] or [Roblox] in the title), but they are very welcome nonetheless.

3. Provide reproduction code

When asking for help, you should provide a reproduction code whenever applicable. This doesn't mean that you should copy and paste your whole project or script into the post, in fact the opposite. Try to isolate the issue you're facing on your own and only include the code needed to reproduce it.

A screenshot or image of the code is never valid. Additionally the code should be provided using the following Markdown syntax:

```lua
<your code goes here>
```

4. Information about environment

When asking for help, and ideally releasing a project, you should include as much information as possible about the target environment.
Most important thing is the Lua API in use, that means the video game, game engine, framework, library, etc.
Other information such as Lua version, environment variables, operating system, etc. may be useful as well.


Posts not following the rules may be deleted without prior notice.
Repeated offenders may be issued a warning and banned.

If you do not agree with the rules or statements made here, please discuss your issue in the comment section, I'm sure something can be done about it.

Moderation

If you want to help and moderate this community, please message leave a comment under this post or contact me in any other way.

view more: next ›