• Re: hey nu; question about Enigma.5

    From NuSkooler@21:1/121 to Alpha on Sunday, January 31, 2021 12:58:28

    On Saturday, January 30th Alpha was heard saying...
    Concurrency was one of the things that drew me to Go (golang). One of its principles was making concurrency part of the programming language, rather than a module that sits on top of it or binding to a callback. I've started messing around with Goroutines in a crappy little door program I'm writing and it's pretty cool. A countdown timer that triggers its own events, writes to stdout, even when a user is typing an input. Everyone gets a channel!

    Two things I wish were around when I started enig: ES6 and async/await keywords. The current code base is all async, but it's callback driven warapped with node-async. await foo() is much nicer than foo(..., (err, result) => {})


    Alpha around Saturday, January 30th...
    than callback hell. Just takes a bit to wrap your head around.

    I really think async, once it clicks for people is much more straight forward. It more aligns with how a human processes tasks in general.



    --
    |08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07"
    |08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08)
    |08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic
    --- ENiGMA 1/2 v0.0.12-beta (linux; x64; 12.13.1)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From paulie420@21:2/150 to All on Thursday, January 28, 2021 11:46:41
    Someone posted today that Enigma has a scripting language in order for any sysOp's to create add-ons or mods. Even though I think this is a dumb question, I'm asking what that language is??

    I assume .js using node? :P
    Or even not using node...

    Anyway, how do Enigma sysOps extend or create mods for the software?

    Thanks, sorry for such a silly question.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/01/26 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150)
  • From NuSkooler@21:1/121 to paulie420 on Thursday, January 28, 2021 20:05:19

    Twas Thursday, January 28th when paulie420 said...
    Someone posted today that Enigma has a scripting language in order for any sysOp's to create add-ons or mods. Even though I think this is a dumb question, I'm asking what that language is??

    It's written in Node.js -- async JavaScript.


    On Thursday, January 28th paulie420 was heard saying...
    Anyway, how do Enigma sysOps extend or create mods for the software?

    Everything you interact with on a enig system is really just a mod when it comes down to it. If you look at a menu.hjson many of them will have a entry like:
    module: some_mod

    In general this means that "menu" is backed by some_mod.js. The base class for *most* things you'd want to do is MenuModule, so you'd do something like:

    class MyMod extends MenuModule {
    ...
    }

    This is a area that's definitely lacking in documentation, but looking at the existing stuff would give you the idea (many people have written mods for it without much issue -- mrc.js being an example.





    --
    |08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07"
    |08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08)
    |08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic
    --- ENiGMA 1/2 v0.0.12-beta (linux; x64; 12.13.1)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From paulie420@21:2/150 to NuSkooler on Friday, January 29, 2021 16:53:13
    Everything you interact with on a enig system is really just a mod when
    it comes down to it. If you look at a menu.hjson many of them will have
    a entry like:
    module: some_mod

    In general this means that "menu" is backed by some_mod.js. The base
    class for *most* things you'd want to do is MenuModule, so you'd do something like:

    class MyMod extends MenuModule {
    ...
    }

    I got it tho; long story short, you can make it do anything you want it to from connect to disconnect - even tweaking the system, although be sure to not doso in a way that breaks when upgrades come out.

    And you can absolutely create new features using new .js. Same as before, this is over my head - but I'm learning Mystic's MPL and could probably fart around and make small changes under Enigma easily, too.

    Also, the mrc.js is a good example because people could look there to see how a complete new functionality IS programmed in .js under Enigma.

    Thanks kindly... I always loved Enigma.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A47 2021/01/26 (Raspberry Pi/32)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150)
  • From NuSkooler@21:1/121 to paulie420 on Saturday, January 30, 2021 12:23:00

    On Friday, January 29th paulie420 was heard saying...
    Also, the mrc.js is a good example because people could look there to see how a complete new functionality IS programmed in .js under Enigma.

    Yep!

    I know the concept of async scares some people that don't have much experience in it. I'll always say: Once you go async you never go back (you'll want this concept for everything...). But with that said, you can also still avoid it with enigma if you want to just create a mod as a "door". By launching a separate process from enigma you don't need to worry about anything being async and can really do whatever you want.



    --
    |08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07"
    |08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08)
    |08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic
    --- ENiGMA 1/2 v0.0.12-beta (linux; x64; 12.13.1)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From Alpha@21:4/158 to NuSkooler on Saturday, January 30, 2021 14:10:20
    I know the concept of async scares some people that don't have much experience in it. I'll always say: Once you go async you never go back (you'll want this concept for everything...). But with that said, you
    can also still avoid it with enigma if you want to just create a mod
    as a "door". By launching a separate process from enigma you don't
    need to worry about anything being async and can really do whatever
    you want.

    Concurrency was one of the things that drew me to Go (golang). One of its principles was making concurrency part of the programming language,
    rather than a module that sits on top of it or binding to a callback. I've started messing around with Goroutines in a crappy little door program
    I'm writing and it's pretty cool. A countdown timer that triggers
    its own events, writes to stdout, even when a user is typing an
    input. Everyone gets a channel!

    I'm also a pretty bad progrgrammer, but hoping to get better.

    When I was writing React code, I avoided async for so long because it
    just seemed so... difficult. Turns out, it's a lot more straightforward
    than callback hell. Just takes a bit to wrap your head around.

    Enigma's structure and the ability to mod just about
    anything/anywhere makes it pretty damn powerful IMHO.

    Best,


    |04[] |11Alpha
    |03The Drunken Gamer |08/ |14TheDrunkenGamer.com:2323
    |07A Talisman BBS

    --- Talisman v0.10-dev (Linux/x86_64)
    * Origin: The Drunken Gamer BBS (21:4/158)