jaeger changed the topic of #crux to: CRUX 3.6 | Homepage: https://crux.nu/ | Ports: https://crux.nu/portdb/ https://crux.ninja/portdb/ | Logs: https://libera.irclog.whitequark.org/crux/
fishe has quit [Quit: Connection closed for inactivity]
fishe has joined #crux
fishe has quit [Quit: Connection closed for inactivity]
ppetrov^ has joined #crux
SiFuh has quit [Ping timeout: 248 seconds]
SiFuh_ has joined #crux
_moth_ has joined #crux
_moth_ has quit [Remote host closed the connection]
_moth_ has joined #crux
_moth_ has quit [Client Quit]
_moth_ has joined #crux
_moth_ has quit [Remote host closed the connection]
_moth_ has joined #crux
ivandi has quit [Ping timeout: 246 seconds]
maledictium has joined #crux
SiFuh_ has quit [Remote host closed the connection]
SiFuh has joined #crux
_moth_ has quit [Remote host closed the connection]
_moth_ has joined #crux
_moth_ has quit [Ping timeout: 256 seconds]
ppetrov^ has quit [Quit: Leaving]
farkuhar has quit [Ping timeout: 240 seconds]
farkuhar has joined #crux
<farkuhar> braewoods: my intention with pkgmeek was to make something a little more maintainable than what we're currently using. When I took on the task of adding renaming functionality to pkgmk last year, the primary stumbling block was just how disorganized it had become, after accumulating so many patches over the years.
<farkuhar> it turns out that nearly every feature added as a patch over the years can be implemented in 560 LOC (50 of those lines being comments). Also I got around to tackling FS#1851 and FS#1763, the first of which has gone more than a year without any action in our bugtracker.
<braewoods> farkuhar: I see. Do you have any experience with C?
<farkuhar> dlcusa: thanks again for taking a look at the script and sharing your preliminary impressions. The last 24 hours have been a sprint toward ironing out the bugs, and I encourage you to try the latest version in my git repo.
<farkuhar> braewoods: alas, I've only worked with a handful of codebases written in C. would be willing to learn more sometime, though.
<braewoods> The other half that could use an overhaul is the C++ code that's all over the crux source repos.
<braewoods> Unfortunately it's even rarer to find programmers that can handle that. I'm probably the only one around here.
<braewoods> One thing that bothered me was the lack of reusable code for common stuff like database access.
<braewoods> everyone just rolls their own.
<farkuhar> I was actually considering as my next side project a rewrite of pkgadd in Perl. Isn't there a flavor of BSD that uses Perl for its package/ports manager?
<braewoods> You may be thinking of Debian. APT uses Perl extensively.
<braewoods> I've looked at the Perl C API before. It's a mess from what I recall.
<braewoods> If I had to choose any language to extend with it'd probably be Lua. It's easy to learn and has a very simplified C API for extending it.
<farkuhar> Anyway, my first step towards realizing that rewrite was to grok the source code of pkgadd. I posted my notes in a revised manpage: https://git.sdf.org/jmq/Documentation/src/branch/master/man8/pkgadd.8
<farkuhar> I take your point about not reusing a common codebase for database operations. Although pkgadd and prt-get do outsource their database operations to a shared library, the other tools just roll their own, as you said.
<farkuhar> s/prt-get/pkgrm,pkginfo/
<braewoods> i'm considering making the C++ code into a C + Lua setup. Maybe turn pkgutils into a Lua script after that.
<braewoods> Lua mostly because it's friendlier to scripters and easy to integrate with. I've started using Lua to make my C programs better.
<farkuhar> if i'm understanding correctly, the C part would be a thin layer providing filesystem operations and database transactions, while the user-facing aspects of pkgutils are all in Lua?
<braewoods> more or less. the stuff that's expensive or hard to do from Lua.
<braewoods> Though most of the heavy lifting is already done by libarchive, there's still some intensive processing on the C++ code.
<braewoods> the idea is i would create Lua modules that can be reused by other scripts. the modules would be written in C.
<braewoods> Lua would be leveraged to greatly simplify things like memory and resource management since you can hook into the GC and more to get something similar to C++ destructors.
<braewoods> as well
<braewoods> userdata and metatables can be leveraged to create C modules with an OO interface on the Lua side
samsepi0l has joined #crux
samsepi0l has quit [Client Quit]
<braewoods> the idea i was having is to make it more approachable for our typical users to contribute something. having more code in a scripting language would probably help that a lot.
<braewoods> the C parts should probably be code that rarely needs changing
<braewoods> one thing i'm thinking of adding that current pkgutils doesn't provide is the ability to rollback an interrupted database operation
<braewoods> e.g., power loss during a pkgadd/pkgrm operation
farkuhar has quit [Read error: Connection reset by peer]
ppetrov^ has joined #crux
braewoods has quit [Ping timeout: 250 seconds]
braewoods has joined #crux
braewoods has quit [Remote host closed the connection]
braewoods has joined #crux
braewoods has quit [Changing host]
braewoods has joined #crux
braewoods has quit [Read error: Connection reset by peer]
braewoods has joined #crux
braewoods has quit [Changing host]
braewoods has joined #crux
samsepi0l has joined #crux
samsepi0l has quit [Quit: leaving]
samsep10l has joined #crux
_moth_ has joined #crux
ppetrov^ has quit [Quit: Leaving]
samsep10l has quit [Client Quit]
samsep10l has joined #crux
farkuhar has joined #crux
ocb has quit [Ping timeout: 240 seconds]
ocb has joined #crux
samsep10l has quit [Ping timeout: 240 seconds]
cybi has joined #crux
ivandi has joined #crux
tilman has quit [Ping timeout: 258 seconds]
tilman has joined #crux