1. 2

    Thanks so much for putting this - I had read it before years ago, but totally failed to find a link to it when I wanted to reference it.

    1. 3

      Tim Rogers used to have some of the most beautiful internet writing back then. I always remember this one too:

      http://archives.insertcredit.com/features/dreaming2/

    1. 2
      1. 17

        I’m one of the maintainers of Conjure, happy to answer questions about this project!

        1. 12
          1. How does this compare to gRPC and friends (e.g. Thrift), especially now that gRPC-Web is in GA? When would I pick Conjure over them?
          2. Are there plans for additional language support? I’m interested in Go in particular.
          1. 9
            1. We’re big fans of gRPC! One downside is that it does require HTTP/2 trailers, which means if you want to make requests from browsers or curl, you’d need to deploy a proxy like envoy to rewrite the traffic. I think Conjure makes sense if you’re already relying on HTTP/JSON in production or care about browsers. It’s very much designed with simplicity in mind, and doesn’t actually prescribe any particular client or server, so allows you to get the upside of strong types for your JSON, without requiring big changes to your existing stack or API.

            2. Definitely! Internally, we use go extensively so I think conjure-go is next in the open-sourcing pipeline. One interesting feature of Conjure is that since the IR is a stable format, you can develop new language-generators independently without needing any involvement from the core maintainers!

            1. 4

              I have the same question as 1. but with OpenAPI.

              1. 6

                They’re conceptually pretty similar, but we found the Java code that Swagger generates pretty hard to read. While Swagger has to add many annotations (https://github.com/swagger-api/swagger-samples/blob/master/java/java-jersey-jaxrs/src/main/java/io/swagger/sample/resource/PetResource.java#L43) to deal with any conceivable API you might define, Conjure is intentionally more restrictive in terms of what you can define and tries to focus on doing a small number of things very well.

                This results in code that is as readable as a human would write (https://github.com/palantir/conjure-java/blob/1.3.0/conjure-java-core/src/integrationInput/java/com/palantir/product/EteService.java), with all the benefits of modern best practices like immutability, NonNull everywhere etc.

            2. 60

              How do you feel about your work being used to enable human rights violations?

              1. 14

                This is actually an interesting question.

                1. 6

                  Probably terrible but also aware of the unlikelihood of escaping it. Sometimes you have an action and it has good and bad consequences and the good consequences are avoidable, but the bad aren’t. In that specific scenario it’s not wise to give up the good consequences just so you aren’t “getting your hands dirty”. Sure if you can find some way to escape the evils then you should try all available options but sometimes things are bad.

                  Oh I’m realizing this is specifically Palantir’s stack lmao. Nevermind yeah don’t work on that on your free time y’all, no hard feelings intended towards @iamdanfox .

                  1. 2

                    As it seems I’m living under a rock, could you paste some link to provide the context for your question?

                    Edit: never mind, found it; “Palantir provides the engine for Donald Trump’s deportation machine”

                    1. 1

                      Which is the same machine as previously used, right?

                  2. 3

                    How does it compare to Twirp? (https://github.com/twitchtv/twirp)

                    Update after a quick search: Conjure uses JSON whereas Twirp uses ProtocolBuffer.

                    1. 2

                      I think Twirp has a lot of similar motivations to Conjure - the blog post even mentions an emphasis on simplicity and it works over HTTP1.1 (unlike gRPC).

                      One key difference I see is that many API definition tools are essentially monoliths, pretty much completely controlled by the originating company. We’ve gone for a different approach with Conjure and tried to decouple things so that significant additions (e.g. adding a new language) happen without blocking on the core maintainers at all.

                      For example, if you wanted to add Swift support, you’d make a brand new conjure-swift repo and write a CLI that turns the stable IR format into Swift source code. We have a standardised test harness (written in Rust) that you can use to prove that your new conjure-swift code will be compatible with other Conjure clients/servers. Once your CLI works, you can package it up in a standard way and it should slot nicely into existing build tools.

                    2. 3

                      How is unionization in Palantir? Is there a reason why you’re still working there? Do you need support? I’m not from USA but I can point you to people willing to support workers like yourself.

                      1. 2

                        Hey I am really interested in the project, but I’m getting errors when going through the tutorial on the GitHub repo, specfically ./gradlew tasks was giving me an error fetching the com.palantir repos. I copy pasted the exact instructions and I’m unsure where to ask for help on this. I figured I’d at least let you know to see if you experience the same issues.

                        1. 2

                          Hey! Glad to hear you’re interested in the project and sorry about the issue with the getting started guide. i’ve gone ahead and updated the guide to fix the problem you encountered. Thanks for pointing out the issue. Hope you enjoy using the project and feel free to reach out with any questions, comments or concerns

                      1. 12

                        The two role models I think of immediately are Julia Evans and Simon Peyton Jones. They are both clearly extremely knowledgable, really good at explaining things and – perhaps most importantly – readily admit ignorance. I aspire to do that myself, too, and I suspect part of the reason that Julia and Simon seems to know so much is that they’ll say “I don’t know!”.

                        I saw a talk by Simon Peyton Jones last month about linear types in Haskell, and someone from the audience asked “why is it called linear types?” to which Simon – without hesitation – replied something to the effect of “I don’t know!”. For some reason it was very nice seeing such a knowledgable person unabashedly admit ignorance on a topic close to his area of expertise.

                        Some examples from Julia’s writing:

                        I’m not going to go into how you read that info right now because frankly I don’t know.

                        It’s not completely clear to me under what circumstances having swap on a computer at all even makes sense. It seems like swap has some role on desktop computers.

                        I was going to say that this isn’t how it works on Linux. But! I went and looked at the docs and apparently there is a posix_spawn system call that does basically this. Shows what I know. Anyway, we’re not going to talk about that.

                        1. 3

                          I also look up to Simon, and exactly for those reasons. In that same talk he starts saying “I usually don’t understand types, I’m very bad with them”. That straightforward ignorance is something I strive to achieve.

                        1. 6

                          Here is a shot I submitted to r/unixporn. It’s i3 with a Solaris CDE inspired theme I created. My computer is a Dell XPS 9360, a Vortex Vibe keyboard and a new Microsoft Intellimouse. Time is spent mostly in Emacs coding. Since I dont’t use an external monitor, I use i3 with one app per workspace usually.

                          1. 1

                            What’s the file manager there, if I may ask?

                            1. 1

                              It’s SpaceFM with MacOS classic icons.

                            2. 1

                              Damn man, what a beautiful theme. Wouldn’t mind if you shared it :)

                              1. 1

                                Sure, everything should be here https://github.com/julienXX/i3config