7
vringar
7y

God fucking dammit.
I spend the entire day trying to get [this piece of shit] (https://github.com/php-ds/extension) to work and at the end of the day its tests pass, but when I try to instantiate a set, I still get bloody errors.
I mean, am I not punished enough for having no guidance in learning PHP and knowingly having to create an absolute monstrosity just because I don't know how to do it better.
Fuck it, I'm just gonna go cry myself to sleep now and only will start feeling like a failureagain, when I wake up.
sorry for bothering you with my problems.

Comments
  • 4
    Don't kick yourself over doing something in an ugly way. It's better that you do it at all than that it's beautiful. I've tried to set up a site and given up a couple of times-- application development all the way for me.

    Good luck, dude. Working with difficult tools sucks.
  • 0
    Whats wrong with PHP arrays?
  • 1
    @strang3quark I am going to have roundabout 10000 devices (relatively complex object) stored in one structure and a list of 15000 MAC Addresses in another.
    I need to check whether a device has a Mac address and assign the security level accordingly.
    And iirc the set implementation allows me to do this on the weak Amazon instance I am going to be running this on in the time span that I have.
  • 0
    @vringar I'm not experienced in this but I would probably use an inmemory SQLite database
  • 1
    @strang3quark I should consider this. Thanks for the input.
  • 1
    Additional info would be useful, but strang3quark has a valid point.

    Why did u plan using the ds extension?

    You could save half the data and be more efficient if u would split out the vendor part of the mac address.

    The device id, as in pci id, usb id, etc if it exists in the device object seems like a good reference to associate with the mac address.

    If you need help, dont be shy to ask.
Add Comment