Thread: [KT] NBUtil - Utils to make your kotlin easier

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11  
    Registered Member
    Join Date
    Nov 2013
    Posts
    20
    Thanks given
    3
    Thanks received
    42
    Rep Power
    52
    Quote Originally Posted by harley_rae_ann View Post
    either way im not reading code on a site webpage by webpage.
    Just clone the repository...?
    Reply With Quote  
     

  2. Thankful users:


  3. #12  
    nbness2#5894

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    623
    Thanks given
    237
    Thanks received
    109
    Rep Power
    256
    Changes
    - BaseRandom now abstracts the pickItem function with a generic type. example: BaseRandom<Int>().pickItem() -> Int
    - Changes to the subclasses of BaseRandom to reflect those changes.
    - Removed vestigial data from MemoWeightedTable, made the equivalent data from WeightedTable internal rather than private so that MemoWeightedTable can access it.
    KT/JAVA - NBX 637 - [Only registered and activated users can see links. ]!
    KT - Drop tables made Easy and Readable - [Only registered and activated users can see links. ]!
    KT - Item Containers made Safe, Easy and Powerful - 2019/05/04 UPDATED V2 - [Only registered and activated users can see links. ]
    KT - Utils to make your life easier - [Only registered and activated users can see links. ]
    KT - Hopping Islands: From Java to Kotlin - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #13  
    nbness2#5894

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    623
    Thanks given
    237
    Thanks received
    109
    Rep Power
    256
    Update 3/17/2019
    • Splitting utils up in to their own separate repos starting with BoolUtil and StringUtil (was TextUtil, but StringUtil is less ambiguous).
    • Providing jar as well as source code for each util.
    • Improving the inside code composition wise as well as documentation wise. Have to find a better way to generate docs bc dokka doesnt work too well at least for markdown (boolutil has a dokka generated wiki page).


    NbUtil project (where you can find the link to all sub projects): [Only registered and activated users can see links. ]
    BoolUtil: [Only registered and activated users can see links. ]
    StringUtil: [Only registered and activated users can see links. ]
    KT/JAVA - NBX 637 - [Only registered and activated users can see links. ]!
    KT - Drop tables made Easy and Readable - [Only registered and activated users can see links. ]!
    KT - Item Containers made Safe, Easy and Powerful - 2019/05/04 UPDATED V2 - [Only registered and activated users can see links. ]
    KT - Utils to make your life easier - [Only registered and activated users can see links. ]
    KT - Hopping Islands: From Java to Kotlin - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #14  
    nbness2#5894

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    623
    Thanks given
    237
    Thanks received
    109
    Rep Power
    256
    Update 4/3/2019
    • RandomUtil
      • Code is now documented much better
      • Expanded to have much more features such as StringRandom and NumberRandom
      • Added a UniversalRandom. You can choose which type to get back, but you have to provide the source for it
      • WeightedTable has been updated to be able to use custom weights without being a MemoizedWeightedTable, but MemoizedWeightedTable is still faster for multiple accesses of custom weights
      • Lots of functions for Array and the primitive array types (IntArray, CharArray, etc.)
      • And much more!
    • Up next is NumberUtil and TagUtil. Keep watch!


    NbUtil project (where you can find the link to all the updated sub projects): [Only registered and activated users can see links. ]
    RandomUtil source: [Only registered and activated users can see links. ]
    RandomUtil jar: [Only registered and activated users can see links. ]
    KT/JAVA - NBX 637 - [Only registered and activated users can see links. ]!
    KT - Drop tables made Easy and Readable - [Only registered and activated users can see links. ]!
    KT - Item Containers made Safe, Easy and Powerful - 2019/05/04 UPDATED V2 - [Only registered and activated users can see links. ]
    KT - Utils to make your life easier - [Only registered and activated users can see links. ]
    KT - Hopping Islands: From Java to Kotlin - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #15  
    nbness2#5894

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    623
    Thanks given
    237
    Thanks received
    109
    Rep Power
    256
    Updated the main post to be less cluttered

    Update 4/24/2019
    • BoolUtil changes
      • BoolArray renamed to DenseBoolList (it implements List<Boolean>) and made more memory efficient (now uses ByteArray rather than LongArray)
      • Added MutableDenseBoolList. Uses same memory per Boolean as DenseBoolList but now you can make it bigger or smaller as well as use all the List extension functions provided by kotlins standard library.
      • Added destructuring of primitive number types in to booleans up to their respective bit amounts. e.g. Byte can destructure up to 8 Boolean like such: val (bool1, bool2, bool3, bool4, bool5, bool6, bool7, bool8) = byteValue
      • Added ways to randomly generate some common [inline]Boolean[inline] collections
    • NumberUtil changes
      • You can now access sequential sub-numbers in primitive numbers. e.g. you can access byte 1 (bits 0 to 7), byte 2 (bits 8 to 15) ... byte X in a Long. You can access an integral primitive as long as there is a bigger integral primitive. Using number.getByte(byteIndex), number.getInt(intIndex), etc.
      • You can now access individual bits using number.getBit(bitIndex)
      • You can now set sequential sub-numbers using number.setShort(shortIndex, shortValue), number.setByte(byteIndex, byteValue), etc.
      • You can now set individual bits using number.setBit(bitIndex, booleanValue)
      • ByteArray conversion (to and from) still present
      • Removed conversions to and from hex strings
      • Parity (isEven, isOdd) still present
      • Added DenseNumberPair for Byte, Short and Int. These store 2 of the given number in a smaller space than a standard library Pair would
      • Added Vector and NumberVector (implements Vector) as well as NumberVector implementations for the primitive number types. Glorified List
      • Added MutableVector and MutableNumberVector (implements MutableVector) as well as MutableNumberVector implementations for the primitive number types. Glorified MutableList


    TagUtil is coming next for sure this time. BoolUtil was too juicy not to update.

    NbUtil project (where you can find all the updated sub projects): [Only registered and activated users can see links. ]

    BoolUtil: [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    NumberUtil: [Only registered and activated users can see links. ]/[Only registered and activated users can see links. ]
    KT/JAVA - NBX 637 - [Only registered and activated users can see links. ]!
    KT - Drop tables made Easy and Readable - [Only registered and activated users can see links. ]!
    KT - Item Containers made Safe, Easy and Powerful - 2019/05/04 UPDATED V2 - [Only registered and activated users can see links. ]
    KT - Utils to make your life easier - [Only registered and activated users can see links. ]
    KT - Hopping Islands: From Java to Kotlin - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #16  
    nbness2#5894

    nbness2's Avatar
    Join Date
    Aug 2011
    Posts
    623
    Thanks given
    237
    Thanks received
    109
    Rep Power
    256
    Update 2019/04/30 (using new TagUtil)
    TagUtil
    • Completely rewritten
    • Very similar to previous iteration when using
    • More customizability allowing for more accurate "emulation" of other tag languages
    • Less keystrokes to achieve the same thing compared to previous iteration
    • Easier for your brain to interpret while creating your tags

    And with that, the separation, rewriting and jarring of NbUtils is complete! Suggestions for additions and improvements are welcome!
    TagUtil: [Only registered and activated users can see links. ]\[Only registered and activated users can see links. ]
    Spoiler for CODE TO RECREATE THIS POST:

    With a fresh new project and the jar as the only library:
    Code:
    
    import tagUtil.example.*
    
    val FINAL_TEXT = TEXTBOX {
        +fontColor("FFFFFF", "Update 2019/04/30 (using new TagUtil)")
        +"TagUtil"
        +list {
            +"Completely rewritten"
            +"Very similar to previous iteration when using"
            +"More customizability allowing for more accurate \"emulation\" of other tag languages"
            +"Less keystrokes to achieve the same thing compared to previous iteration"
            +"Easier for your brain to interpret while creating your tags"
        }
    
        +"And with that, the separation, rewriting and jarring of NbUtils is complete! Suggestions for additions and improvements are welcome!"
    
        +"TagUtil: "
        -textUrl("https://bitbucket.org/nbutil/tagutil/", "SOURCE")
        -"\\"
        -textUrl("https://bitbucket.org/nbutil/tagutil/downloads/", "JAR")
    
        +spoiler { value = "CODE TO RECREATE THIS POST"
            +"With a fresh new project and the jar as the only library:"
            +codeBlock {
                +"You get the point"
            }
        }
    }
    
    fun main() {
        println(FINAL_TEXT)
    }
    KT/JAVA - NBX 637 - [Only registered and activated users can see links. ]!
    KT - Drop tables made Easy and Readable - [Only registered and activated users can see links. ]!
    KT - Item Containers made Safe, Easy and Powerful - 2019/05/04 UPDATED V2 - [Only registered and activated users can see links. ]
    KT - Utils to make your life easier - [Only registered and activated users can see links. ]
    KT - Hopping Islands: From Java to Kotlin - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ] - [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 21
    Last Post: 12-07-2017, 09:08 AM
  2. How to make your own brush[tut]
    By adolfo in forum Tutorials
    Replies: 4
    Last Post: 09-21-2007, 05:22 PM
  3. [] How to make your own spells on NPC`s []
    By ParasyncheD in forum Tutorials
    Replies: 5
    Last Post: 06-10-2007, 09:12 PM
  4. How to make your own p server (other way)
    By Alex in forum Tutorials
    Replies: 13
    Last Post: 06-10-2007, 10:28 AM
  5. Replies: 4
    Last Post: 05-16-2007, 07:50 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •