NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Arrows to arrows, categories to queries (2025) (reasonablypolymorphic.com)
sleepyams 4 hours ago [-]
Nice, I've also been playing around with creating a programming language based on some concepts in category theory, but I've been focusing more on the concept of polynomial functors. I know there is somewhat of a stigma against category theory on Hacker News for some reason, but it's cool to see people inspired to create new languages inspired by category theoretic ideas.

It was cool to read about "co-choice", although I looked up that term and couldn't really find it used anywhere, do you have a source? (Also I think there is a typo in the type signature in the code block in this section. The codomain of `cochoiceHask` should be `b` right?) The idea of building a loop from a function `Either a c -> Either b c` is very interesting. It reminds me of some of the ideas in the book "Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory" by Joseph E. Stoy, which you should check out if you haven't.

yccs27 4 hours ago [-]
For me the `cochoice` function feels like a recursion scheme, possibly a hylomorphism of some functor?
sleepyams 3 hours ago [-]
Yes, I think these are related-ish, also to traces on symmetric monoidal categories. If you have any algebraic/categorical formalization of wiring diagrams, this is essentially taking a block with inputs A and C and outputs B and C and connecting the C output to the C input with a self-loop.
yccs27 4 hours ago [-]
How does the use of arrows instead of functions actually help here? If you have a terminal object aka unit type `()`, then arrows `() ~> a` are equivalent to elements of `a`.
DrMonkeypox 10 hours ago [-]
[flagged]
skavi 11 hours ago [-]
bold to lead with an example that makes no sense at all.
whateveracct 10 hours ago [-]
to you..maybe you're not the target audience. you don't have the prerequisites hehe
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 17:24:53 GMT+0000 (UTC) with Wasmer Edge.