How to tell if effect is algebraic?Lengths and substitution in L-systemsUnderstanding the goals you can reach...

What would be some possible ways of escaping higher gravity planets?

smartctl reports overall health test as passed but the tests failed?

Why do neural networks need so many examples to perform?

Why do objects rebound after hitting the ground?

What are some ways of extending a description of a scenery?

"I showed the monkey himself in the mirror". Why is this sentence grammatical?

What's the winning box for the King in a Queen against 7th rank Bishop-pawn endgame?

I have trouble understanding this fallacy: "If A, then B. Therefore if not-B, then not-A."

Fraction within another fraction

Can you say "leftside right"?

Where does documentation like business and software requirement spec docs fit in an agile project?

Why does a single AND gate need 60 transistors?

Players preemptively rolling, even though their rolls are useless or are checking the wrong skills

Sensor logger for Raspberry Pi in a stratospheric probe

Did ancient Germans take pride in leaving the land untouched?

What can I do to encourage my players to use their consumables?

Is layered encryption more secure than long passwords?

Critique vs nitpicking

Trying to detect if any checked values contains a specific string

How do I avoid the "chosen hero" feeling?

If I tried and failed to start my own business, how do I apply for a job without job experience?

Minimum Viable Product for RTS game?

Why "rm -r" is unable to delete this folder?

Why is Shelob considered evil?



How to tell if effect is algebraic?


Lengths and substitution in L-systemsUnderstanding the goals you can reach with different programming models and languagesFrame rule as a change-preserver?How should I think about proof nets?Formal representation of algorithm using recursive algebraic data typesHow to analyze the quality of data definition language?A bicartesian closed category of strict complete partial orders (Hask)Algebraic effects and handlers, dynamic effectsEscaping references in Eff and resourcesProof techniques for showing that dependent type checking is decidable













2












$begingroup$


I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
    $endgroup$
    – Andrej Bauer
    2 hours ago
















2












$begingroup$


I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?










share|cite|improve this question









$endgroup$












  • $begingroup$
    Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
    $endgroup$
    – Andrej Bauer
    2 hours ago














2












2








2





$begingroup$


I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?










share|cite|improve this question









$endgroup$




I've read Bauer's What is algebraic about algebraic effects and handlers? and he talks about IO being an algebraic effect, even though it doesn't have any equations. In other papers on algebraic effects and handlers, people mention effects that are not algebraic, like backtracking. How does one can tell an algebraic effect apart from a non-algebraic one?







pl.programming-languages






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 5 hours ago









Jesper DahlJesper Dahl

192




192












  • $begingroup$
    Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
    $endgroup$
    – Andrej Bauer
    2 hours ago


















  • $begingroup$
    Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
    $endgroup$
    – Andrej Bauer
    2 hours ago
















$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
2 hours ago




$begingroup$
Backtracking can be algebraic, at least most versions of it. Can you give an exact pointer to these claims?
$endgroup$
– Andrej Bauer
2 hours ago










1 Answer
1






active

oldest

votes


















2












$begingroup$

The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.



Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:




  1. Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").


  2. Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".


  3. If your effect looks like you're passing around state of some sort, then it's likely algebraic.


  4. Nondeterministic choice, search, etc., are typically algebraic.


  5. Exception-like effects are algebraic (transactions of various sorts are included).


  6. Anything that looks like communication (I/O, reader monad) is algebraic.


  7. Probabilistic programming is algebraic.



Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "114"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcstheory.stackexchange.com%2fquestions%2f42431%2fhow-to-tell-if-effect-is-algebraic%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2












    $begingroup$

    The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.



    Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:




    1. Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").


    2. Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".


    3. If your effect looks like you're passing around state of some sort, then it's likely algebraic.


    4. Nondeterministic choice, search, etc., are typically algebraic.


    5. Exception-like effects are algebraic (transactions of various sorts are included).


    6. Anything that looks like communication (I/O, reader monad) is algebraic.


    7. Probabilistic programming is algebraic.



    Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.






    share|cite|improve this answer









    $endgroup$


















      2












      $begingroup$

      The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.



      Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:




      1. Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").


      2. Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".


      3. If your effect looks like you're passing around state of some sort, then it's likely algebraic.


      4. Nondeterministic choice, search, etc., are typically algebraic.


      5. Exception-like effects are algebraic (transactions of various sorts are included).


      6. Anything that looks like communication (I/O, reader monad) is algebraic.


      7. Probabilistic programming is algebraic.



      Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.






      share|cite|improve this answer









      $endgroup$
















        2












        2








        2





        $begingroup$

        The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.



        Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:




        1. Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").


        2. Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".


        3. If your effect looks like you're passing around state of some sort, then it's likely algebraic.


        4. Nondeterministic choice, search, etc., are typically algebraic.


        5. Exception-like effects are algebraic (transactions of various sorts are included).


        6. Anything that looks like communication (I/O, reader monad) is algebraic.


        7. Probabilistic programming is algebraic.



        Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.






        share|cite|improve this answer









        $endgroup$



        The general answer which you do not want to hear is: an effect is algebraic if it can be described using operations and equations. The question is a bit open-ended and gives no hint as to what you're expecting, so perhaps you deserve such a useless answer.



        Nevertheless, it's still good to know some typical examples, as they help you develop a feeling for things:




        1. Continuations are not algebraic. That's important because there are effects that let you encode continuations, and so those are not aglebraic either. (But be careful about the meaning of "encode").


        2. Delimited continuations are kind of algebraic, see Section 6.11 of "Programming with algebraic effects and handlers".


        3. If your effect looks like you're passing around state of some sort, then it's likely algebraic.


        4. Nondeterministic choice, search, etc., are typically algebraic.


        5. Exception-like effects are algebraic (transactions of various sorts are included).


        6. Anything that looks like communication (I/O, reader monad) is algebraic.


        7. Probabilistic programming is algebraic.



        Most useful effects fall under one of these cases. If I forgot anything, I am sure people will remind me in the comments.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 2 hours ago









        Andrej BauerAndrej Bauer

        21.7k52102




        21.7k52102






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Theoretical Computer Science Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcstheory.stackexchange.com%2fquestions%2f42431%2fhow-to-tell-if-effect-is-algebraic%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

            Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

            How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...