Open marado opened 10 years ago
Just checked out the library you suggested and it looks pretty neat - certainly seems beneficial to use it and correctly handle telnet negotiation and options. The utils/telnet-chatd.c shows the implementation quite nicely... even for me, someone who hasn't touched C or the talker code for way too many years! ;-)
I have been wanting to do something like this for a long time. Although I can foresee just rewriting the entire thing from scratch as useful too (then we can get rid of the linked-list of users bugs where one user causes another to be deleted--aka the .kill bug; I always thought an array of pointers would be best). We could also jettison netlinks too in favor of intermud or something similarly better defined. Not to mention allow for multiple connections methods, e.g. ssh, in addition to telnet, etc.
Yeah, I confess that the work is huge enough to make me think I better work on a new code base instead of rewriting much of Amnuts. I've been working on a new talker base at https://github.com/marado/TalkerNode , but even there... the fact that it's only me coding for it doesn't give me much energy to spend time on the project as much as I could. In the end, I guess I'll keep working on TalkerNode instead of contributing on Amnuts until the sittuation changes, but I'd probably favor the solution with more people developing in.
Total rewrite? Wow... Isn't it all the little bugs that make it fun to play with? What do you mean, "no"?!?
I did have a very quick peek at the libtelnet thing, although for the most part I just managed to seg-fault the talker. A lot. But in theory I think only a few sections need to change (though I may, admittedly, not be thinking the whole thing through very much). But basically adding the telnet opts (probably to globals.h), tweaking accept_connection() to telnet_init and telnet_negotiate, and I also shifted some of the main loop out to another function to handle the user input part. I think from there it's really the write_user() function that needs updating as the majority of output to the user goes through that. Outside of the code there already it's a case of creating the telnet event handling and compiling it all together. Haven't touched it from my first quick play in about six months, though.
But if we're talking a major rewrite/from scratch, can I but my request in for a nicer format for storing the user/board/mail/etc data? SQLite, or at the very least JSON. (Unified user format that'd work on TalkerNode as well? ;-) )
As for netlinks removal... Well, it's pretty much not there if you don't use the compile flag, but I see what you mean. Doesn't InterMUD require a centralised server to route message through, or can you do it directly from talker to talker? That's one of the good things about netlinks, it's just a direct connection. But, to be honest, are there even that many talkers around these days that would make connecting up worth while? I remember in Way Out West's heyday I only had about four talkers that we'd have netlinks with.
There are already some node.js based talkers/MUDs out there. I was also thinking of moving in that direction (if I never get to the rewrite concept).
Netlinks can be compiled out but there are still a number of dependencies that cannot be cleaned up until the other code is removed.
@amnuts - my two biggest issues with Amnuts are (1) telnet-related bugs and (2) unicode-related bugs (I run a Portuguese talker, meaning most sentences passing around have 8 bit characters somewhere). Talking about a total rewrite might be an exaggeration, but after spending some time reading gcc code to understand what the hell was happening with Amnuts in a specific arch (utf8 character triggering a SEGFAULT)... well, I sort of got tired. While the sockets part can be solved with libtelnet, I don't really know (but I didn't spend time digging into it) any easy/clean way to properly deal with charsets and weird characters on Amnuts, and I guess it would at least mean revisit every single buffer, array, struct and whatever else to recalculate its size. It might still not be a complete rewrite, but I'm not convinced that fixing those two issues wouldn't take more time than writing a talker base from scratch on Node.js... and that's why I started TalkerNode.
@Uzume - I did an extensive (re)search on what was available out there (on other languages, not only Node.js), nothing would quite suite my needs when I started TalkerNode. That being said, I'd be happy to be proven wrong (and test/comment on whatever solutions you might think fit) - and I would also be happy to accept contributions to TalkerNode ;-)
Well I have not done a comprehensive review but a quick search revealed:
And of course your project too of course. Likely there are other less well known ones in hiding somewhere.
I totally get what you're saying, @marado. Amnuts (well, almost any NUTS-based talker, I guess) was never constructed with utf-8 in mind and doesn't really support that too well in the way it's constructed. And, yeah, it'd probably take more time to fix than rewrite from scratch. I personally started to do it in PHP to play around with some libs there, but didn't take it anywhere near to a complete rewrite of Amnuts.
@Uzume thanks for the list. I went through them, ranviermud seems promising. The original project seems stopped (quite a number of ignored PRs and so on), but there's a fork that was active until July ( https://github.com/seanohue/ranviermud ). The code isn't quite stable (in fact, I had to make some pull requests already), but if it is active... well, it's a code base with two working on it instead of just one, so I quite might give it a shot. I will be waiting to see the feedback on my pull requests till now, tho ( https://github.com/seanohue/ranviermud/pulls ), even as a way of measuring the pulse to the project (if the fork is still active or what).
The others... well, none of them would make me turn my attention from TalkerNode to them.
@marado I see your PRs got merged in a timely fashion. It seems he is not good at seeing updates to PRs (e.g., PR #11) but it seems if the patch is good from the start he is fairly quick merge it.
@Uzume , Hm, You're talking about the two (minor) PRs I submitted to shawncplus/ranviermud, but I'm more curious about what's going to happen to the ones I submitted to seanohue/ranviermud . While my two PRs were accepted upstream, the project seems otherwise stalled (since 2013), including feedback on other PRs (some trivial) and issues.
I mean,... seanohue/ranviermud seems more (potentially) active and, between the two, I guess I'd rather work on the fork (even if always open to push contributions upstream, if there's interest by the project owner).
@marado, I know the discussion here has gotten way off topic and though this is still technically open, it is also mostly stalled. With that said, I have been considering dabbling in Rust and Wasm.
This way it can run in node.js (and possibly in the browser too). I am not sure if it will be a talker as per se though as I have been looking at game engines as well (then again MUDs and interactive fiction game engines are close concepts to talkers in some ways).
And if I need a more established user interface I could add electron/electron to the node.js mix (and perhaps some library to WebGL if I need some more serious graphics).
I totally agree that anything with any significant textual content (e.g., a talker) should definitely consider internationalization (including Unicode) and localization (often this implies some sort of scripting). Sadly the history with talkers and MUDs has not supported this well (things had to start somewhere though I suppose).
Hi @Uzume ,
While I have made sporadic contributions here and there to other code bases, I have been still focusing on my work on TalkerNode[1], despite it still being a one-man effort with sporadic contributions from others. The work with TalkerNode is progressing slowly, and it still doesn't have feature-parity with Amnuts, something I wish to achieve[2], but things are going in the right direction, so I don't see any particular incentive in starting a new effort from scratch. However, if you plan to do something on this field (either on rust, wasm or something else, I have no technological preference) do let me know, and I might end up contributing to it, or, if I see it as (due to having more than one developer) having a more constant development cycle, I might be inclined into shifting my development attention in that direction instead.
[1] https://github.com/marado/TalkerNode [2] https://github.com/marado/TalkerNode/milestone/9
Would it be better to just reunify against a single project? integrating libtelnet could possibly help with standardization and utf-8. I haven't looked into the library yet. There just seems to be a lot of random talker projects.
I've personally played around with writing talkers in other languages: Go https://github.com/blindsight/gotalker C# https://github.com/blindsight/Talker
Only took about 10 years, but my brain finally pulled this out of the dark recesses of my memory, and I started a PR again: https://github.com/amnuts/Amnuts/pull/18
Haven't really tried it out other than what I alluded to in the PR description. Let's face it; my C knowledge is pretty fossilised these days, so it might be pretty shaky code.
Amnuts is still unstafe in the way it handles sockets. Instead of dealing with sockets directly, it could/should use a library that properly handles telnet connections (my suggestion being https://github.com/seanmiddleditch/libtelnet ).
I am aware that this is a big enterprise, and would warrant itself a new version. I am creating this issue as a kind of 'note to self', maybe I'll end up creating a branch for this, and slowly do the work myself.