Author Topic: New fluffos repo containing the 2.28 version.  (Read 528 times)

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
New fluffos repo containing the 2.28 version.
« on: May 21, 2019, 06:24:26 AM »
Wodan was kind enough to release a new version of the FluffOS 2 series, 2.28. I have placed this code including some modifications in the repo-

https://github.com/cartercheng/fluffos-2.x

The modifications are mainly some simple fixes to get it to compile under Ubuntu due to some changes in the header files and migration to the gcc C++ compiler mode in the Makefile. I will be gradually doing some cleaning up to get some unit testing into the driver. I made some changes last week which indicate the direction in which this is going.


Offline Dworkin

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #1 on: August 17, 2019, 08:33:08 AM »
I noticed that you started an issue for JIT compilation, where you consider the option to compile to LLVM IR directly.

Another option would be to do both, preserving lightning-fast LPC compilation. For JIT compilation for DGD, I chose to compile from VM bytecode to LLVM IR in multiple passes; detecting basic blocks, determining the types of expressions, doing dataflow analysis, and finally generating LLVM IR which can be compiled with clang. I have this mostly working (mud boots and I can walk around), but there are a few bugs to iron out.

You can find the code at https://github.com/dworkin/lpc-ext/tree/master/jit.  It could probably be adopted for FluffOS without too much difficulty.

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #2 on: September 10, 2019, 05:22:42 AM »
This repository has been moved to-

https://github.com/silenus-dionysus/fluffos-2.x

I am in the process of some minor clean up and converting the code over to C++. There are other things in the issues section pertaining to future plans.

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #3 on: September 10, 2019, 05:27:34 AM »
Dworkin, It is nice to know someone has finally decided to bite the bullet and do implementation work using the LLVM system for creating a JIT for LPC.

I might do something similar for fluffos in the future though i think my design differs somewhat from yours(but thanks for the heads up).

My particular repository is more of a slow burn project since I feel and a lot of the current i3 members have reflected that the community is no longer what it was and thus there isn't really too much interest people doing development of this sort at present. I am in fact not sure if any of the current muds which still have some players will actually use what I do.

Offline Dworkin

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #4 on: September 10, 2019, 10:41:15 AM »
Silenus, I started working on the JIT compiler a long time ago, but didn't have time to complete it until recently.  I only decided to make use of LLVM a few months ago, before that I was still considering decompiling to C, instead.  I made the first point release of the JIT compiler just now.

The situation for DGD is similar to FluffOS, the community has shrunk and those who still use it are doing their own thing.  As a MUD server engine, DGD was probably feature-complete around 2002, and there is not a lot of interest in new releases.  And to top it off, I spend most of my free time on Hydra now, which is not yet used by anyone at all.  ;D

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #5 on: September 21, 2019, 12:25:26 AM »
I remember from a long time ago now we talked about Hamlet's plans to introduce STM into FluffOS(which he later abandoned). I would assume the final implementation of Hydra is somewhat similar using commit and rollbacks for threads of execution inside the driver. I think Hamlet gave up because it would take a fair deal of work to get all the global variables to play nice with his ideas for the software transactional memory implementation. STM hasn't really caught on yet as a programming model (perhaps given limitations in scalability beyond 8/16 independent threads). I figure if someone could address some of these issues with new ideas perhaps it would gain more traction. 
« Last Edit: September 21, 2019, 12:29:38 AM by silenus »

Offline Dworkin

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #6 on: September 21, 2019, 05:23:33 AM »
STM has the problem that it appears to scale worse than a well-designed implementation using locking, and you still have most of the same design headaches as you have with locking for multi-threaded code. Hydra doesn't require or implement STM, though it uses some of the same underlying ideas.

In any case, FluffOS & DGD are already overpowered for MUDs on present-day hardware, and DGD with JIT compilation is ridiculously overpowered. The speedup offered by JIT compilation will probably not play out in the realm of MUDs.

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #7 on: September 21, 2019, 06:39:52 AM »
I think the added processing power gained by JIT would probably open up new applications or make it possible to revisit the design decisions made in old style muds. Obviously there is little interest in such things now. A* path finding is one thing that did run slowly on muds servers about a decade ago. 

Offline Dworkin

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #8 on: September 21, 2019, 07:29:12 AM »
Another direction you could take with FluffOS is improve the bytecode VM.

I did this for DGD as a prerequisite for JIT compilation.  Getting rid of lvalues as an explicit type gave me a speedup of 10-30%.

Offline silenus

  • BFF
  • ***
  • Posts: 199
    • View Profile
Re: New fluffos repo containing the 2.28 version.
« Reply #9 on: September 21, 2019, 07:50:47 PM »
TBH I am not sure how far I will take the FluffOS code atm. A JIT would be nice but as there are no new mud developers and the community is somewhat dwindling it might simply not be worth the effort for me. I added to the issues just in case I decided to do it. There are some simple things I am trying to do with FluffOS such as upgrading the system to use C++ fully and get rid of the global variables which are more just edit changes to the code. The VM in FluffOS has a lot more opcodes than the one in DGD so doing anything with it involves a fair deal of tedious case by case coding with a lot of cases.