1,706 karma · joined Dec 9, 2019 (6y ago) · 623 submissions
comment 6y ago · link · parent
There's nothing preventing you from already doing this. You can use Isabelle's hammer/CoqHammer to generate a proof, dump the proof term and then replace your usage of the hammer tactic with the term. It's just, why would you want to edit the proof term manually? I'm pretty sure you can do this with Haskell's normal metaprogramming facilities too, it's just really not the intended way.
>Why?
Because it's a lot harder to maintain. Not only do you lose out on information about the generation (Why/How was it generated?), if you change the code it was generated from, you'll have to either manually edit the generated code (especially troublesome because the information of how it was generated was thrown away!) or you'll have to figure out how to do it using tactics again (in that case, why not just keep the tactics as documentation?).
>As you yourself pointed out, tactics would be terrible as an opaque metaprogram - they only work if you don't care about the particular term they generate.
Tactics aren't 'opaque', it's just a pain to manually look at the generated code and I don't see how the same doesn't apply here.
>Because it's built out of several tactic steps, which the article goes into the construction of. You could still (presumably) have built it piece by piece, by applying each tactic one at a time - and each step only modifies the term slightly, leaving a hole for later steps.
You could, but it seems pretty clear to me that this is not the intention. If you just want some form of 'quick actions' you don't need a tactics system. Having an option to 'try filling this hole' heavily indicates that this is to be used for more heavy automation.
comment 6y ago · link · parent
At the top level, sure, but if you have a more complex proof term this breaks completely down. You'd have to evaluate potentially arbitrary expressions to determine the types and furthermore there is nothing to indicate the 'human' rather than mechanical structure of the proof since metavariables are just completely gone. It's just not my experience that I could look at a complex proof term (where I don't already know the underlying proof) and figure it out without using an interactive prover.
>Add or remove a tactic, and the rest of the proof can be completely invalidated
Just like if you randomly removed a part of a proof in term form it wouldn't typecheck anymore? 'stupid' tactics are just as localized as inserting the corresponding term with metavariables . If you're talking about how automation tactics are heavily context dependent, this is more of a fundamental quality of automation rather than tactics. Automation done via reflection suffers from the same issue.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
How so? Writing proofs in Agda is a joy, but it completely fails to document what I spend most of my time looking at: The context and the subgoal. Tactics only documenting this when you're able to step through them isn't something I'd hold against them, they're intended for interactive provers after all.
comment 6y ago · link · parent
I don't understand what this is supposed to mean. How are e.g. coq tactics not the exact same?
>The commands to the LSP tell it how to generate the code, and the code sticks around for editing afterwards.
Not having the metaprogram which generated the code around just strikes me more as an anti-feature.
>What is "normal" metaprogramming?
Arbitrary, "non-sequential" code transformations.
>The particular benefit of using tactics would be that they're designed for small steps of in-flight editing, rather than generating something all at once
Well, for me tactics definitely invokes more serious proof automation than just what you could also do using Agda's emacs commands. This is also the impression I get from the article, the image presented uses some form of auto tactic to generate an entire term in one go. Certainly not what I'd call "small steps of in-flight editing".
comment 6y ago · link · parent
It's possible to write a complex specification to ensure the generated code would be correct, but current automation already struggles with generating proofs for hand written code, let alone generating code and verifying it.
Also, it isn't clear to me whether tactics programs are supposed to be kept as code or just used by the LSP which the gif makes it seem like. To me the strongest benefits of tactics are that they can be used to document what the author was trying to do and that using an IDE they can be executed step-by-step. If it's just to be used by the LSP: What is the point of using tactics vs normal metaprogramming?
comment 6y ago · link · parent
Only in a limited form e.g. exhaustion doctrine prevents you from restricting resale. If someone wants to resell their exclusive Ferrari, there's nothing Ferrari can legally do (though this'll probably get you blacklisted from ever receiving an exclusive vehicle).
In general, terms can't go against existing laws and have to be 'conscionable' to be enforceable (i.e. they can't be obviously 'unfair').
comment 6y ago · link · parent
If any of the requirements change, it's easy to either add more predicates or relax/even outright remove them.
comment 6y ago · link · parent
The author quotes a tweet about someone complaining about the notation used for a basic type judgement for being cryptic. Any introductory text will immediately cover this and looking it up, you can learn the notation (which is really rather simple) in about 5 minutes. Yet, the tweet author claims that they saw this notation 12 years ago and still can't understand it. Well, to me the only reasonable conclusion is that they simply didn't bother spending a few minutes looking it up and instead expected that they would magically understand it after enough time has passed. I seriously doubt that gammas being used instead of the word 'context' is why they're struggling.
And this is my core issue with a lot of these "notation is a barrier" complaints. Instead of being valid complaints about esoteric notation (and especially using this notation without defining it!), it's people who believe that knowing how to program means you should be able to read any PL text without any preparation which is just unreasonable. If you want to seriously engage with a paper, you'll have to read up on the basics first in literally any field.
comment 6y ago · link · parent
Reformist and revolutionist actions aren't contradictory, but reform and revolution absolutely are. People who advocate for revolution (which Zinn does in the above quote) fundamentally reject the idea that peaceful, incremental legislative reform could be used to transform the democratic system.
>Social movements and popular unrest effect the electoral process significantly
Sure, but Zinn isn't advocating for that. This bit
>The situation required not just a new president or new laws, but an uprooting of the old order, the introduction of a new kind of society
makes it pretty damn clear that he thinks real change won't come through the electoral process.
comment 6y ago · link · parent
Yeah, and he believes that this has to happen through a revolution, because the democratic system can't fix itself _even if the people vote and try to change laws to do so_.
>That's not the same as saying it can't be fixed.
Maybe you call tearing down a system and replacing it wither another 'fixing', but I (and likely most others) certainly don't. At the very least, it's a hell of a lot more pessimistic than reformism.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
If you want to count them as package managers, they're by far the worst ones of all the well known languages (with some notable exceptions e.g. guix's and nixos's).
They're not portable between distributions or even different versions of the same distribution (!), since it's non-trivial to install older versions of libraries (or, hell, different versions of the same library at the same time). Not to mention that it's a very manual and tedious process in comparison to all the other language specific package manager. 'Dependency hell' is a problem virtually limited to distro package managers (and languages like C and C++ that depend on them).
Getting older, unmaintained C programs to run on Linux is an incredibly frustrating experience and I think a perfect demonstration of how the current distro package manager approach is wholly insufficient.
comment 6y ago · link · parent
do bar
baz
bazz
with it immediately returning after the first error value it encounters or returning the actual result (this is also how Rust solves it, though they introduce specific syntactic sugar for it rather than an universal monadic sugar).