Search found 32 matches

by fordpinto
Fri Mar 13, 2020 8:41 pm
Forum: Howtos, FAQs and Tips & Tricks
Topic: Fastest Trigger Types
Replies: 18
Views: 8375

Re: Fastest Trigger Types

This was touched upon in another thread, which is why I ended up here. My first reaction to the suggestion that start of line/exact match is faster than regex was "Yeah, makes sense". But I am now wondering it's a bit more nuanced than that. Some second thoughts: 1) The basic algorithmic s...
by fordpinto
Thu Mar 12, 2020 11:18 pm
Forum: Scripts & Packages
Topic: Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects
Replies: 6
Views: 1780

Enhanced OO wrapper for Mudlet Trigger, Timer, Event and Stopwatch objects

I find object-oriented syntax to be oftentimes more readable, but the reason I ended up making this package is much more practical. When creating "temporary", i.e. dynamic Mudlet triggers and timers I found it very annoying that they keep hanging around even when I do not need them. I was ...
by fordpinto
Thu Mar 12, 2020 9:30 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

@demonnic Appreciate you sharing your thoughts on this. I am not discouraged in the least that this apparently was already discussed many times. I am not trying to drive Mudlet into certain direction. Presently, I can code anything I like as a require() library, and use it just fine, since I am not ...
by fordpinto
Tue Mar 10, 2020 5:43 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

.mpackage/.xml vs require() As I mentioned earlier, currently require() makes more sense to me as means for inclusion of the shared code. I do not think it's a radical notion, since require() was put in place by Lua developers specifically for code sharing and library creation. I am listing some ad...
by fordpinto
Mon Mar 09, 2020 6:56 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

> Deletion is necessary if the file is conflicting with another one, for example - or if the package was uninstalled. In case of de-installation of a package that uses a shared library, I think it's fine to leave shared library in place by default. I do not see a problem with that. Not sure what you...
by fordpinto
Mon Mar 09, 2020 5:51 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

>> Otherwise we could have been piggybacking off luarocks repository to distribute Mudlet shared code. >I don't think so - have you tried to install LuaRocks on Windows? You got me, I have no idea how easy/hard it is to use luarocks under Windows. Sounds like it's a pain. >> For Lua files it would m...
by fordpinto
Mon Mar 09, 2020 12:10 am
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

For sure, one can use require(). Just the other day I have installed a shared Lua library using luarocks, and there was zero problem using that library from within Mudlet using require(). That wasn't Mudlet specific code, just a general use library from luarocks. However, it doesn't seem like the be...
by fordpinto
Sat Mar 07, 2020 8:12 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

I thought some more about this, and I am somewhat amused that I realize this quite late into this discussion, that the things that make me unsure about using Mudlet module feature and Lua require feature are pretty much the same. It's the lack of convention on the location for these common library c...
by fordpinto
Fri Mar 06, 2020 7:15 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

>> Seems to me that the current practice at the moment is to just copy a chunk of somebody else's code into your own package. >Where do you get this idea from? Our discussion so far. Since the context is code duplication, I do not see a fundamental difference between pasting the code in as a separat...
by fordpinto
Thu Mar 05, 2020 9:57 pm
Forum: Help Forum
Topic: Package and module interdependence best practices
Replies: 24
Views: 4424

Re: Package and module interdependence best practices

@Vadi I think dependencies become an essential part of code deduplication effort as soon as you move the scope of discussion to something more than a single monolithic package, but that's a far more abstract discussion than I intend to have here. I was just looking for examples of how to do this - s...