Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    rom1504bot
    @rom1504bot
    <Rob9315> .pds is basically abandoned as a format
    <Rob9315> at least so far
    rom1504bot
    @rom1504bot
    <bendgk> makes sense
    <bendgk> I tried to make my own format a while ago
    <bendgk> but also ended up abandoning it lol
    <bendgk> It was quite similar to pds tho
    <bendgk> also, does anyone know what a restBuffer is?
    <bendgk> im currently trying to make a kotlin implementation of a protodef compiler/generator
    rom1504bot
    @rom1504bot
    <rom1504> takes the rest of the buffer
    rom1504bot
    @rom1504bot
    <Saiv46> Hi, I need help with Protodef
    <Saiv46> I have non-counted array of varints, which ends with 0x00
    <Saiv46> Is there a way to do that within existing spec?
    rom1504bot
    @rom1504bot
    <extremeheat> I don't think so, built-in array types iirc require a length prefix
    rom1504bot
    @rom1504bot
    <rom1504> I think we have that in dazed sheep
    <rom1504> Mc classic implementation, using protodef
    rom1504bot
    @rom1504bot
    <Saiv46> Checked - no it's not
    <rom1504> So anyway yeah just implement a custom type
    <Saiv46> I implemented RestArray and just ignoring last zero varint
    <Saiv46> Hmm, why not add rest parameter for array datatype?
    rom1504bot
    @rom1504bot
    <Saiv46> Just read items until no bytes left (if any garbage left - it'll throw read error)
    <rom1504> What's your use case ?
    <Saiv46> I'm basically implementing protocol of https://github.com/yggdrasil-network/yggdrasil-go
    rom1504bot
    @rom1504bot
    <rom1504> Ok
    <rom1504> I think for now just do a custom type on your side
    <rom1504> If we find this pattern occurs at least at one other place, we could find a way to bring it into the standard
    <rom1504> Best avoid adding complexity until we really need it
    <rom1504> But yeah I don't see a lot of drawback on a rest param
    <rom1504> Except it's a bit more complex
    <rom1504> Maybe put it in an issue and we revisit later ?
    rom1504bot
    @rom1504bot
    <Saiv46> Well, about standard ProtoDef-io/ProtoDef#46
    rom1504bot
    @rom1504bot
    <Saiv46> Hi again, I got another problem with Protodef
    <Saiv46> I need to prefix container by its serialized size
    <Saiv46> My oblivious solution was using anon field, but it won't work with compiler
    {
        "anon": true,
        "type": [
            "count",
            {
                "type": "varint",
                "countFor": "bootstrap"
            }
        ]
    },
    {
        "name": "bootstrap",
        "type": "bootstrap"
    }
    rom1504bot
    @rom1504bot
    <Saiv46> Is there any valid usage of count left?
    rom1504bot
    @rom1504bot
    <rom1504> afraid you'll need another custom type
    rom1504bot
    @rom1504bot

    <bendgk> hey guys, for reading the bitfield type in protodef, the first paramaters are the most significant bits right?

    That seems to be the case for how the position bitfield is laid out, just confirming that this is true

    rom1504bot
    @rom1504bot
    <rom1504> Yes
    rom1504bot
    @rom1504bot
    <AntiCheap> Should I care about the rust protodef implementation being zero copy for string and buffers?
    <AntiCheap> lifetimes are great but they're getting in the way of code generation...
    rom1504bot
    @rom1504bot
    <Rob9315> you are asking on the wrong server, the answer here will be to just have something working
    rom1504bot
    @rom1504bot
    <Ic3Tank> Am I right in the understanding that emitted custom_payload packets from nmp are not compatable with writing custom_payload packets back to clients? As custom_payload expects a buffer and not an object?
    rom1504bot
    @rom1504bot
    <U9G> no, thats wrong. the minecraft client also recieves a buffer with the custom_payload packet
    rom1504bot
    @rom1504bot
    <Rob9315> apparently it doesn't
    <Rob9315> the definition says { name: string, data: restBuffer }, yet for example for MC|Brand it actually becomes { name: 'MC|Brand', data: 'vanilla' }
    <Rob9315> as in the "restBuffer" turns into a string for no reason...
    <Rob9315> and can thus not be reencoded
    rom1504bot
    @rom1504bot
    <BRAVE SPIRIT_12> πŸ‘‘οΉ’Are ​​you looking for a server to make new friends and play minecraft or to spend some of your free time? PixelCraft is for you.
    ────────────────────────────
    πŸ”΄οΉ’ Active server
    πŸŸ οΉ’ Minecraft factions, crackshots
    πŸŸ‘οΉ’ Polling Bot and Entertainment
    πŸŸ’οΉ’ Helpful and competent staff
    ────────────────────────────
    οΉ’Join our server to meet new people!
    https://discord.gg/eKMvCPehxr
    rom1504bot
    @rom1504bot
    This message was deleted