CarlZalph

  • Content count

    1,622
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Status Replies posted by CarlZalph

  1. image.png.6bc8c37fe008f3a3c92041be73feeaa7.png

    image.png.daadcefd2d5ecc9372a006114ab81961.png

    image.png.a0d912ead7281a690cb1e1b0fc12fd31.png

    Just posting for the gaggles and jiggles.  And a recorded timestamp for the inevitable to come.

    1. CarlZalph

      CarlZalph

      image.thumb.png.964cfbf058ffee93f30ce0bd73350a23.png

      image.thumb.png.4fcdaeddb9a97000d303be336eda06d3.png

      image.png.27a088d58f241051589721afc2d33fbd.png

      Few more 'cause why not.  Wortox smellin' the air for souls 'n' all.

    2. (See 3 other replies to this status update)

  2. It makes me wonder if anyone says 'Warbucks' anywhere on here and JoeW'll be there to keep the peace.

    1. CarlZalph

      CarlZalph

      24h later and the entire subforum is just a swarm of joke threads and vitriol.

      Sorry, JoeW/mods.

    2. (See 1 other reply to this status update)

  3. Too many closed doors.

    1. CarlZalph

      CarlZalph

      No, I'm not locked in an enclosed area or suffering from a mental breakdown or what have you.  Couple of people asked me directly on other mediums if I was alright with those specific worries.

      Right place in heart so thanks to those individuals, but allow me to allay future fears.

      The doors are just metaphors for opportunities.  Opportunities when they reveal themselves will either let someone to go into them or shut them out, much like how doors work.

      In my case here there seems to be so many opportunities that I merely cannot access yet, and this was a venting of some frustration of it.  Then my hopes got raised when another similar opportunity came along but alas!  Fidgety little bugger eludes me once more.  This is fine.  More will come along in the future, and I won't let the missed deter me from getting more.

    2. (See 3 other replies to this status update)

  4. Too many closed doors.

    1. CarlZalph

      CarlZalph

      Doors.  They let one in or keep one out.  Alas, the last door mentioned closed shut after teasing its contents.

    2. (See 3 other replies to this status update)

  5. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Wrote a UDP Proxy for use with Man-in-the-Middle attacking myself.  Already had one written in C, but that's not quite the point of me learning a language!

      Differences:

      • In C you're probably working with BSD-like sockets directly as I was.  In short, it's a lot of setup work to be done to make it work.
        • In go it's cut down a lot of this by having a 'socket' be a 'connection' that you either 'listen' from or 'dial' to.  You then read/write to these connections with all of the underlying socket layer abstracted away.  This is an upside of go.
      • In C buffers are usually malloc'd to remove them from the stack and onto the heap.  Or if your program is performing under memory constraints, then a memory pool is utilized.
        • In go there's no real preallocation- memory management for the programmer is nonexistent.  If go can't allocate the required memory behind the scenes, then the program must terminate and there's no going back.  This is a downside of go.

      Similarities:

      • In C sockets should be placed on their own thread because network read/writes are blocking.  Probably with pthread under *nix-like environments.
        • Go routines.  Threading with low effort and high code readability.  Go does it better since it has innate threading.
      • Performance is about the same after profiling each.  It's a simple task really.
      • Signal handling is *nix-like, and has about the same amount of 'boiler plate' code required to make them function.

      All-in-all I'm quite happy with how much less code was required to write it, but that's more running along the lines of the language itself having such abilities prebaked, and C needing libraries.  Really like the performance being very similar.  Dislike the memory explosion possibility in go where there is no upper bound limits being able to be set before hand- this sort of kills go for anything with high memory constraints.

    2. (See 12 other replies to this status update)

  6. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      They're similar but the cause is different.  You are right in that it will skip all code until it hits a recover if one exists.

      In other languages you'd put the 'unsafe' code in a block and catch errors.  In go you're meant to handle each error explicitly for each function that can have an error, like in C.

      In go you can recover from a panic anywhere so long as you have a function that tries to recover somewhere in the stack.  This allows recursive functions to throw out a panic and to be caught from the start as it unwinds the stack back to the caller.

    2. (See 12 other replies to this status update)

  7. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Golang has panic + recover.

      It is defined from the developers of go that you should only use panic if a user's input wasn't expected.  For instance, a file parser that reads in a table of integers suddenly hits a string that shouldn't be, the parser should send out a panic to terminate further parsing; the input is no longer valid.

      Recover is to be used inside a defer function to stop a panic from propagating further.  By default a panic goes all the way back to goroutine 'main' and makes the program terminate.  If you recover from a panic then the program continues operation from where it caught the panic.

      It is assumed that if a panic happens then in the recovery phase it should setup things to return an error code back out to the user using the package.  Documents suggest looking at the JSON parser for their recursive panic escape on invalid parsing.

    2. (See 12 other replies to this status update)

  8. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Having a blocked read on a socket get closed by another goroutine will return an error to the reader.  Thanks to the error handling the dev team forced the error string to be "use of closed network connection" for go 1.x.

      https://github.com/golang/go/issues/4373

      This issue was opened in 2012 and "fixed" in 2018 by forcing this restriction to not change this error string value cross platforms.

      In go 2.x this might change to be better, so for now casting 'error' to 'net.OpError' and then calling its 'Err.Error()' to compare to the string literal to check if I closed the socket or not.

      I know not all languages are perfect and some workarounds are needed, so this doesn't phase me too much especially with a newer language.  Just noting things here.

    2. (See 12 other replies to this status update)

  9. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Threaded routines are called 'goroutines'.  They aren't necessarily real threads- Go will automatically make them into new threads if it thinks it needs them or keep the routine into a low-use thread that has other routines in it.  This is all abstracted from the programmer, but neat to know.

      Channels are good for goroutines that need to communicate with each other or an overseer.  Channels use '<-' to denote data transference, and always points like this.  (variable) <- (channel) will read from the channel, and (channel) <- (variable) will write to it.  Reading/writing with a channel handles the locking and unlocking of the used data so you don't have to manage it with mutex/semaphore/etc.

      WaitGroups help with keeping all threads managed until they all quit.  You can have several groups for different goroutine bundles inside goroutines flying all over, with you barely having to manage anything other than ensuring the WaitGroup gets its +Add calls and its defer Done calls in the goroutines.

      Signal handling from the OS (SIGINT/SIGTERM) requires that the main function (aka main goroutine) is available for processing.  Which is to say that if you spun other goroutines that don't release their hold on the CPU, then you can lock yourself out- make sure all goroutines give up control every once in a while with a sleep or blocking function.

    2. (See 12 other replies to this status update)

  10. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      https://golang.org/ref/spec#Selectors

      See: Rules 1+3

      It's the method receiver Golang has that lets one pick and choose if the method should be a pointer or not- my use of 'function' isn't as precise as it could of been in this case.  I'm used to having a function be defined as the whole declaration of it, strings attached.

      Anyway, if a method receiver is not pointer and you try to use the function with a pointer of the receiver type, then the compiler will complain about it since it wasn't expecting having to dereference for you- only pointer receiver methods get this benefit.  It also considers this no longer a field selector.

    2. (See 12 other replies to this status update)

  11. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Go automatically derefences pointers of structures to access its fields.  This both pleases me and makes me feel wrong doing it, coming from C.

      Noted that the language is strict for when functions are declared using a pointer requiring the dereference.

      I'll stick with dereferencing at the cost of typing more, to be verbose and to stick with the C-style while avoiding this strictness.

       

      Defer is very handy and makes the goto-label structures in C no longer needed.

    2. (See 12 other replies to this status update)

  12. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Klei also uses it for some of their services, frontend and backend.  So far from playing around with it I've gathered that it's really geared towards Internet traffic and parallel processing.  I think this will replace my C+curl usage if applicable.

      As for the Github account, I thought about it but the depot itself hasn't been touched in 3 years and the account holder hasn't made any changes since that time too.  I feel that it'd be a waste of my time to setup the account for the changes to be stuck in pull request limbo.

    2. (See 12 other replies to this status update)

  13. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Created a market/trade auto confirmer using YellowOrWhite's go-steam-mobileauth.  The code example only demonstrates creating a new authenticator, so I wrote a thing that reads in the maFile and ensures the account is all fresh with sessions, then checks for confirmations to confirm all of them.

      The person's code also isn't up to date and will fail in a few spots thanks to Valve.  I don't have a Github account, so alas the changes will never be brought to light.

    2. (See 12 other replies to this status update)

  14. I've decided it.  I'm going to learn Go as a programming language.

    Installed and things are functional.  Play time.

    1. CarlZalph

      CarlZalph

      Syntax feels like a mix between C, Python, and Java.  Package system feels like Java's.

      'godoc' is really helpful.  Nothing like seeing what's all available in a C-header-like fashion, but in a stricter outline on how it's printed out.

      Learned about marshaling being a thing.  It's a looser form of serialization technically, but is generally used interchangeably in other languages.

      Crashes by doing anything wrong, intentional or not, provide helpful crash stack traces.  Same with compiling in that it tells you what it expected versus what was present.

    2. (See 12 other replies to this status update)

  15. Too many closed doors.

    1. CarlZalph

      CarlZalph

      One door cracked a little bit open today.

      Let the light shine on, I embrace it.

    2. (See 3 other replies to this status update)

  16. Not sure why I feel a desire to help people when they don't ask for it.

    So much time spent on others when I could have merely done it for my own benefit.

    What a waste.

    1. CarlZalph

      CarlZalph

      Note that this isn't an attempt at being passive aggressive, just a venting.

      Please forgive my statements here if you take offense to anything or if I seem very negative.  Just tired of many things.

  17. Can't grass chew late shuns @Sudura2017 for getting a, would I dare, ominously fitting title, I'm actually smiling hahaha

    1. CarlZalph

      CarlZalph

      @minespatch

      Since we were partners it makes sense that it was tied to be the same.

      Though I'd say bonus points if one of us had a 'W' instead of an 'M'- it would fit the duality theme even more.

    2. (See 2 other replies to this status update)

  18. 33wQETd.png

    Party noises, I suppose, are appropriate for this event.

  19. why would you do this to us carl D:

     

    1. CarlZalph

      CarlZalph

      Bugs are bugs!

      Gotta fix 'em up right and tight.