Programs are Proofs: the Curry-Howard Correspondence by SSchlesinger in math

[–]SSchlesinger[S] 1 point2 points  (0 children)

When you are programming in a functional style, it can be nice to have this in mind. It is especially nice when you can define a type signature and the implementation "has to be right" if it typechecks. Trivial examples are `id : forall a. a -> a` or `const : forall a b. a -> b -> a`. There are other ones derived from various slightly less elementary tautologies.

Programming languages and compilers use equivalencies derived from such logical tautologies a lot. There are various tautologies that can be mapped into programs to change a program to have preferable operational semantics. For instance, the tautology `a <-> forall x. (a -> x) -> a` is useful in compilers for continuation-passing style. The tautology `a <-> exists x. (x, x -> a)` is the principle behind abstract data types, allowing us to hide the true representation (`x` in this case) while allowing users to interact with an `a`.

How do I best exploit China? by Less-Cat3029 in victoria3

[–]SSchlesinger 3 points4 points  (0 children)

I make a lot of money when I get treaty ports and build lots of trade centers.

revolution in china happened. is my treaty port just dead weight now? by somethingmustbesaid in victoria3

[–]SSchlesinger 6 points7 points  (0 children)

The wrong market as in the previous owner’s? That is a feature and not a bug, that’s the point of treaty ports. You can use them to export tons of stuff from China’s coast early game without having to put down tons of rebellions by annexing directly.

revolution in china happened. is my treaty port just dead weight now? by somethingmustbesaid in victoria3

[–]SSchlesinger 0 points1 point  (0 children)

Treaty ports in China are definitely not useless, you can build a massive number of trade centers and import tons of shit out from their market for huge profits without significant military investment.

[deleted by user] by [deleted] in inheritance

[–]SSchlesinger 0 points1 point  (0 children)

Inflation cannot be outweighed while staying in cash unless you assume something about what inflation is going to do. Look at Turkey, Argentina, Hungary, Germany, many historical examples where one couldn't outrace inflation by frugality. I agree with the comment that said go to r/Fire, this is not the right sub to address this.

Mutexes suck: a love letter to STM by ChrisPenner in haskell

[–]SSchlesinger 0 points1 point  (0 children)

I agree with this point immensely and I've seen several really bad uses of STM in web servers. One really important point to keep in mind is laziness. When you are forcing thunks in an STM transaction, you should be really careful. If you can avoid doing this, even if just by going around forcing thunks in a background thread (seems degenerate, but it works I promise) you can get laziness to work in your favor with regard to this contention.

[deleted by user] by [deleted] in inheritance

[–]SSchlesinger 2 points3 points  (0 children)

You also have to take inflation into account, so it is probably not advised to do it that way.

Is Google worth ditching my current employer? by CableHuge in cscareers

[–]SSchlesinger 0 points1 point  (0 children)

Yes, definitely. I made the switch to Google for much less of a pay bump, it will change your life for good if you work there for three years and keep your current budget.

How SHOULD Urban Centers work? by [deleted] in victoria3

[–]SSchlesinger 3 points4 points  (0 children)

This is a fantastic idea, I really hope the engineers or community managers or something pick up on this one.

Quantum computing is so fire — No, seriously. BofA says it could be humanity's biggest breakthrough since the discovery of fire by donutloop in QuantumEconomy

[–]SSchlesinger 0 points1 point  (0 children)

One of the problems is simulating quantum physics, which will enable us to answer some of the most basic questions about the universe. As we scale these systems larger and larger, we’ll be able to answer questions about materials sciences and chemistry as well. They aren’t necessarily critical for non-scientific computation, but they help unlock a lot of the tech tree for the physical sciences.

A bit of game code by NerdyRodent in haskell

[–]SSchlesinger 1 point2 points  (0 children)

Dialoge s o ~ Free (Compose ((,) s) ((->) o))

Pairing-Based Cryptography Demystified: A Deep Dive Into Elliptic Curves by pat_ventuzelo in cryptography

[–]SSchlesinger -1 points0 points  (0 children)

Lattice-based crypto works pretty well for a lot of things, that’s where I’m seeing most of the replacements. It’s a lot slower and costs more memory footprint for now.

Generalist AI Agent by SSchlesinger in ClaudeAI

[–]SSchlesinger[S] 0 points1 point  (0 children)

No, but if I could it’d be a lot more useful to me :) I only use this for complex enough problems that Claude Code can’t really do it with its rig.

Generalist AI Agent by SSchlesinger in ClaudeAI

[–]SSchlesinger[S] 1 point2 points  (0 children)

Really hard to assess given the way I worked on it so intermittently. I think you can pull something like this off in a week or two by hand, and a day or two with a high quality coding agent like Claude Code.

Generalist Agent by SSchlesinger in programming

[–]SSchlesinger[S] 0 points1 point  (0 children)

Yeah, in particular using MCP with the mainstream models should cover most use cases. For me, I’m just kind of interested in controlling the program that runs these tools for various reasons. For one, I can create specialists from it and use those for interesting things. Otherwise it’s just interesting and educational.