[ $davids.sh ] — david shekunts blog

🔒Semi-proprietary software or "what kind of bastards" 🔒

# [ $davids.sh ] · message #190

🔒Semi-proprietary software or "what kind of bastards" 🔒

First time I'm encountering such bastardism in the world of libraries

So, cancelled, explained in comments why it was done

  • @ [ $davids.sh ] · # 663

    There's a fantastic library called sqlc - you write pure SQL, it checks it against your DB, and generates typed Go code.

    It's Open Source, all that jazz.

    I wanted to programmatically extract SQL from the code, then feed it into sqlc, and finally write those structures back into Go code with minor modifications.

    AND THAT'S WHEN I HIT A HUGE WALL.

    Basically, in Go, if you put something in a folder named "internal," nothing above the level where this folder resides can import the contents of "internal."

    So, these assholes put all their code in "internal"...

    This means you can build a utility from their library, you can develop their library, you can see all the source code, BUT YOU CANNOT USE IT IN YOUR OWN CODE.

    So it's Open Source, but only as long as you use their specific utility.

    I've never seen such fucked-up behavior before.

    I'm sure this was done to prevent people from building other projects on top of sqlc: want this functionality? Copy the code yourself, manually.

    In short, they're assholes, and don't be like them.

  • @ [ $davids.sh ] · # 664

    Sure, there's a hack for that: make a fork, pull everything out of internal, publish it, and every time you merge from their master, programmatically put it back into internal, merge, and pull it out of internal again.

  • @ Grigoriy ITK Malyshev · # 665

    Saw a post the other day saying that a library in apt-get only allows Patreon subscribers.

  • @ [ $davids.sh ] · # 666

    Ahahahah I want to do the same but with OnlyFans

  • @ Artur G · # 667

    OSS ≠ Free 😁

  • @ Artur G · # 668

    I think they just don't want to support such an API. And I understand them.

  • @ [ $davids.sh ] · # 669

    Hmmmm, listen, I hadn't thought about it from that angle.

    So, if the hypothesis is: "they shut everything down so people wouldn't try to use them as a library and write a billion angry comments because they didn't understand shit" – not only is it plausible, but I would do the same myself...

    Thank you, yes, that sounds logical, case closed.