middleclass
guix
middleclass | guix | |
---|---|---|
9 | 48 | |
1,721 | 272 | |
- | 0.4% | |
0.0 | 3.5 | |
about 1 year ago | 5 months ago | |
Lua | Scheme | |
MIT License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
middleclass
-
Is there a way to create namespaces/hierarchy in the documentation with LDoc?
I am trying to document my code and I am using LDoc for that and for OOP I am using the library middleclass. All of my classes are in a main framework folder and inside that I have each namespace as a folder and then classes that are specific to that namespace in those folders.
-
Lua: The Little Language That Could
The ConTeXt typesetting system tightly integrates Lua. One aspect of Lua that I dislike is its inability to easily write OOP-ish code. What's impressive about the language is that it can be extended to do so in astonishingly little code:
* https://github.com/kikito/middleclass
With OOP in place, I was able to typeset a hexagonal grid and a symbolic representation of a neural network on top, using a more OOP-like approach. The classes are straightforward.
A vertex defines a point in 2D space:
* https://github.com/DaveJarvis/keenwrite-themes/blob/main/bos...
An edge connects two vertices:
* https://github.com/DaveJarvis/keenwrite-themes/blob/main/bos...
A graph connects edges:
* https://github.com/DaveJarvis/keenwrite-themes/blob/main/bos...
A priority queue serves for ordering graph edges by weight of adjoining vertices:
* https://github.com/DaveJarvis/keenwrite-themes/blob/main/bos...
With these concepts in hand, we can typeset a grid and a "neural network" on top:
* https://github.com/DaveJarvis/keenwrite-themes/blob/main/bos...
Here's an example of the output for chapter 1:
* https://i.ibb.co/19DCDZy/ch-1.png
And chapter 14, where the "network" has grown in complexity:
* https://i.ibb.co/ncf16vg/ch-2.png
This is for my near future hard sci-fi book on AGI. I'm looking for alpha readers to give me feedback. See profile for contact details.
- Doing what you love when the money won’t follow
-
To all plugin authors: standard class realization
To reduce the amount of boilerplate code, I created the fork of middleclass repo suitable for Neovim plugin managers: it just adds a symlink to middleclass.lua file in lua/ directory. middleclass is well known and tested, so I suggest using it as a standard class realization. I also open a pull request to merge it upstream.
-
Is doing OOP in lua considered bad practice?
Not exactly what op asked, but if you want classes in Lua definitely check out https://github.com/kikito/middleclass
- Alternative to Love2d
-
OOP in Love2d
Like /u/TheMightyHUG pointed out below, there are patterns you can use to do OOP without any extra help. In the past I have used some libraries to improve the ease of doing so, specifically middleclass: https://github.com/kikito/middleclass
-
A complete implementation of the Set data structure in Lua
Same, but when I do I like when authors include everything in one file so it's easy to manage. Here we have the library, some small 10 line file with helper functions that's required and we also need to remember about the licence. Take middleclass as an example, one file, license included, ready to plug and develop.
guix
- Nix – A One Pager
-
Pkl, a Programming Language for Configuration
> So what we are missing now is a 500GB framework that can write the config file for the programming language that is writing a config file for the actual program I wish to use.
That exists since 1960. It's called LISP. The e.g. https://guix.gnu.org/ uses with great success, the Guile Scheme dialect of LISP, to be precise. And FYI the "framework" is:
$ ls --human-readable --size $(readlink $(which guile))
-
NixOS: Declarative Builds and Deployments
> inventing a brand new purely functional language programming language.
ISTM that if you dislike that, then there's GUIX.
https://guix.gnu.org/
Very briefly, AFAICT, it's "Nix but using Scheme".
-
Linux saved my life
And just wait till you discover Arch Linux, Gentoo, Guix, or NixOS.
-
The nicest web browser of 2023 uses Lisp.
https://guix.gnu.org for example. It did load before an update but it doesn't anymore.
-
Java community welcomes kotlin, c/c++ community welcome rust and go and Javascript community welcomes typscript except emacs community who still refuse to welcome gnu guile.
Is it? Seems to me it's used for some pretty cool stuff, heard of Guix?
-
Lua: The Little Language That Could
I think a "competitor" to Lua would be Guile [1], but I am not sure if it gets close to Lua in terms of lightweightness... it was designed to be used in the GNU project, with similar objects as Lua: to be light, easily embeddable. It's a Scheme (Lisp) so maybe not for everyone's taste... its "coolest" use i know of is for configuring Guix [2] (the GNU version of Nix).
[1] https://www.gnu.org/software/guile/
[2] https://guix.gnu.org
-
Immutable OS suggestions
No one said Guix yet, might be worth a look: https://guix.gnu.org/
-
What are some of the more innovative linux distributions?
GNU Guix! A fully functional package manager and distro heavily inspire by Nix. The primary difference between it and Nix being that it is almost entirely written and configured in GNU Guile, an implementation of Scheme (Lisp) and the official extension language of the GNU Project (originally intended to be for GNU what emacs lisp is for emacs).
-
Rust Offline?
You should perhaps utilize guix for your projects. It provides rather acceptable rust resp. crates support and in a perfectly reproducible build environment. But be aware, that it even tries to build even the rust compiler from source by going through all this nasty steps of its iterative bootstrap process. This can be a little bit complex and time-consuming, if you need an up-to-date version of rustc.
What are some alternatives?
awesome-lua - A curated list of quality Lua packages and resources.
nix - Nix, the purely functional package manager
pyxel - A retro game engine for Python
t2sde - T2 SDE Linux
classic - Tiny class module for Lua
live-bootstrap - Use of a Linux initramfs to fully automate the bootstrapping process
TIC-80 - TIC-80 is a fantasy computer for making, playing and sharing tiny games.
ungoogled-chromium - Google Chromium, sans integration with Google
moonscript - :crescent_moon: A language that compiles to Lua
steam-runtime - A runtime environment for Steam applications
CC-Tweaked - Just another ComputerCraft fork
ublue - A familiar(ish) Ubuntu desktop for Fedora Silverblue.