Fork me on GitHub

In a defn podcast episode from a year ago Timothy Baldridge mentioned a talk that demonstrates a core.async fork that can pause channels, show a diagram etc and I can't find it. Does anybody know where it is? He said it was in Clojure West or conj.


I remember a talk at euroclj Slovakia about it


Hmm, or maybe they just referenced it


it's not this sort of thing right?

👍 4

@UG1C3AD5Z Seems like that's the one. Thanks!

👍 4

Continuing For a long time I felt like types were a weakness of clojure. But over time I've changed my mind. Not knowing what data looks like is a completely separate proposition from having a compiler enforce it for you.


Well, not completely. If the compiler enforces types, then you will know what types you have. But whether it's something that will overall be useful is hard to tell.


I think the problems pointed out with typed data can be avoided with changes in coder behavior


Maybe you're used to measuring ground coffee with a precisely calibrated spoon and now someone shows you that you just need to push a button and it will take the correct amount, you might flounder for a long time trying to re-implement the precise measuring tools, which turn out to be entirely unnecessary for the flow. I think it's more about avoiding unnecessary work, and types are more often than not unnecessary, in my opinion. I would be interested in counter-examples that demonstrate the opposite.


I've been using malli recently to describe the shape of my data with extremely understandable error messages. It's been absurdly helpful because you can even specify if data structure is closed, which Rich seemed to not want in spec. I think any language that doesn't give you tools to describe data will become unwieldly as it grows. It seems his complaints are mainly that they didn't have a nice way of specifying data, which I actually haven't had until malli.

😮 4

I think closed spec checking is coming in spec2 (


@U2FRKM4TW You're right. Although I suppose you could eschew typed compiler checking for some other kinds - I don't know what exists in that space though.


Linters, no?

👍 4

What I think is particularly interesting, is that I don't know that tools are necessarily what we need in order to solve this problem. For sure, once we've written something down in some form (comment, DSL) it would be nice to gain extra benefits from that (and this is the premise upon which I feel spec attempts to base itself - maximum leverage from your input). > I think the problems pointed out with typed data can be avoided with changes in coder behavior I think this is exactly right. I'll expand on it by pointing at something like Ring middleware. In a typed language, you will need to define N types in order to express the various requests as they pass through: Request -> RequestWithJSONBody -> RequestWithJSONBodyAndTimingInfo ... Obviously in many languages with types you don't do that, you model the problem otherwise to solve this problem. In Clojure we just create a hashmap and allow for ambiguity between the middleware. But you can offset that ambiguity by saying that X middleware takes "A ring request with the expectation that the :body is a clojure data structure". There, you know what it takes now! But what this doesn't do is force you to rethink your modelling altogether: "Maybe X should be a function which takes a clojure structure and is called from the request".

🐝 4

@U2FRKM4TW I was thinking more "program flow without types" sort of space. Some linters probably into that category (no def inside def).


Maybe I still misunderstand what you mean, but linters (or something else) that do type inference sound like they should allow you to create "program flows without types".


Sorry, I'm agreeing 😂 You're right! Kondo is a good example of this.

🙂 4
Bill Phillips02:04:22

There’s a lot that I don’t know about this topic. What I do know is that when folks at Microsoft wanted to build real refactoring tools for JavaScript, another dynamic language, they built TypeScript to do it

Bill Phillips02:04:11

I also know from my own work that automated refactoring tools are worth their weight in gold when doing maintenance work on a large codebase


It's hard for me to add lots of meta data to code and keep it read-able... if code and meta data can be the same that is ideal


but I would still like some way of knowing what lightening a function is capable of ... some standard way of seeing ins and outs of functions could be powerful


I think types are a great tool to ensure cohesion within a codebase. They are less helpful for cross-system design and cross-system cohesion. Rich's The Language of the System helped me get a grasp on this.

😲 4

I want  a setup where I can have a clojure web server which can dynamically add new domains, with SSL certificates set up? The sites would be low traffic and I'm not worried about high performance. After experimenting with a few approaches I’ve found using letsencrypt’s certbot plus nginx to be the easiest process for getting SSL working for a domain. I believe adding a domain name will just involve a few command line calls and making a new nginx config file for the domain.  I’m a little bit worried though that this will end up being a pain to manage at some point, having a bunch of text files in config format (nginx) that’s not really great to change programatically. I’m thinking I’ll just have the data about the domains in edn somewhere, and a clojure function that can generate all the config files and shell strings to execute.  Part of me thinks it would be nicer to have a JVM-only solution without nginx, but it seems like there is less easy to use tooling out there for these setups, and that there will be a learning curve to pull this off. Would this be worth it?  Is there an obvious better path to go down to achieve this? Has anyone done anything like this? Any tips or tricks?


I've used openresty SSL module with great success. We used to provision the certificate from our application using ACME's DNS challenge, and then have a small openresty reverse proxy using this module ( simply grabbing the certificate from redis. Our use case was to provide a whitelabel Q&A page on our customer's domain.


It amounts to about ~150 lines of configuration and lua code and has worked like a charm so far.


Probably not valid for your use case by we use AWS for all this. Only downside is that you can attach a max of 25-50 certs to a load balancer, which in practice means you may have to either merge your certs or use more load balancers.


@jjttjj Caddy can be a simpler alternate to nginx


woah, caddy seems pretty great, thanks for the suggestion!


totally hands off https is exactly what I want

David Perrenoud14:04:40

Just as a warning: I went back to Nginx because of the breaking changes of Caddy 2. Some plugins such as rate limiting are entirely missing


Any suggestions/recommendations for an online translation management tool? I know of Transifex but their support for ICU messages is limited.