home.social

#quines — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #quines, aggregated by home.social.

  1. @dubiousdisc wrote:
    «The killer feature of Lisps is not macros or structural editing (though those are nice too). The killer feature is REPL-driven development. Writing and testing code are not separate stages; they are intertwined. It's a completely different way to program.»

    The latter two sentences are true (we can add exploration to writing and testing).
    I don't think that there is a _single_ killer feature, though.
    For example, REPLs are available for quite a few languages nowadays, but these languages still don't "feel like" Lisp.

    What is usually called homoiconicity is also important, for example, not so much by itself, but by the way it affects directly or indirectly many aspects of using a language.
    A lot has been said about homoiconicity, of course, but still, let me add an illustration.
    Define a quine as an expression Q in a programming language such that Q is equal to eval(Q).
    Obviously, the precise representation of Q and the precise notion of equality will be language-dependent.
    Now, compare a quine (in the above sense) in a Lisp to a quine in Python.

    With regards to another aspect of the big topic, see also an old paper by Guy Steele called Growing a Language (or Making a Language that Can Grow, or something like that).

    #ComputerProgramming
    #GrowingALanguage
    #Homoiconicity
    #Lisp
    #Programming
    #ProgrammingLanguages
    #Quines
    #ReadEvalPrintLoop
    #REPL

  2. P.P.S.

    Is this The Heart of Homoiconicity™?

    A rare warranted use of `eval' (Elisp):

    (let ((q '((lambda (x) (list x x)) (lambda (x) (list x x)))))
    (equal q (eval q)))
    => t

    after
    (setq lexical-binding nil)
    as needed.

    #Elisp
    #EmacsLisp
    #Homoiconicity
    #Lisp
    #Quines

    @screwlisp

  3. P.P.S.

    Is this The Heart of Homoiconicity™?

    A rare warranted use of `eval' (Elisp):

    (let ((q '((lambda (x) (list x x)) (lambda (x) (list x x)))))
    (equal q (eval q)))
    => t

    after
    (setq lexical-binding nil)
    as needed.

    #Elisp
    #EmacsLisp
    #Homoiconicity
    #Lisp
    #Quines

    @screwlisp

  4. P.P.S.

    Is this The Heart of Homoiconicity™?

    A rare warranted use of `eval' (Elisp):

    (let ((q '((lambda (x) (list x x)) (lambda (x) (list x x)))))
    (equal q (eval q)))
    => t

    after
    (setq lexical-binding nil)
    as needed.

    #Elisp
    #EmacsLisp
    #Homoiconicity
    #Lisp
    #Quines

    @screwlisp

  5. P.P.S.

    Is this The Heart of Homoiconicity™?

    A rare warranted use of `eval' (Elisp):

    (let ((q '((lambda (x) (list x x)) (lambda (x) (list x x)))))
    (equal q (eval q)))
    => t

    after
    (setq lexical-binding nil)
    as needed.

    #Elisp
    #EmacsLisp
    #Homoiconicity
    #Lisp
    #Quines

    @screwlisp

  6. P.P.S.

    Is this The Heart of Homoiconicity™?

    A rare warranted use of `eval' (Elisp):

    (let ((q '((lambda (x) (list x x)) (lambda (x) (list x x)))))
    (equal q (eval q)))
    => t

    after
    (setq lexical-binding nil)
    as needed.

    #Elisp
    #EmacsLisp
    #Homoiconicity
    #Lisp
    #Quines

    @screwlisp

  7. P.S.
    A tad of cheating:

    (defmacro q (&whole f) "A \"macroexpand-1 quine\"." f)

    and I can't say if this gives any useful food for `macrolet' thought.

    #CommonLisp
    #Quines

    @screwlisp

  8. P.S.
    A tad of cheating:

    (defmacro q (&whole f) "A \"macroexpand-1 quine\"." f)

    and I can't say if this gives any useful food for `macrolet' thought.

    #CommonLisp
    #Quines

    @screwlisp

  9. P.S.
    A tad of cheating:

    (defmacro q (&whole f) "A \"macroexpand-1 quine\"." f)

    and I can't say if this gives any useful food for `macrolet' thought.

    #CommonLisp
    #Quines

    @screwlisp

  10. P.S.
    A tad of cheating:

    (defmacro q (&whole f) "A \"macroexpand-1 quine\"." f)

    and I can't say if this gives any useful food for `macrolet' thought.

    #CommonLisp
    #Quines

    @screwlisp

  11. P.S.
    A tad of cheating:

    (defmacro q (&whole f) "A \"macroexpand-1 quine\"." f)

    and I can't say if this gives any useful food for `macrolet' thought.

    #CommonLisp
    #Quines

    @screwlisp

  12. By definition, a quine has no normal form [late correction].
    For a well-known example, a _single_ β-reduction of the (reducible) term
    (λx.xx)(λx.xx)
    yields itself.

    Thus giving
    ((lambda (x) (x x)) (lambda (x) (x x)))
    to Scheme doesn't terminate.
    (Needs an `eval-1', maybe??)

    Then
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
    works in Elisp (but obviously not Common Lisp) with lexical binding off.

    Off the top of my head, I don't know how to do it with `macrolet'.

    #Lisp
    #Quines

    @screwlisp

  13. By definition, a quine has no normal form [late correction].
    For a well-known example, a _single_ β-reduction of the (reducible) term
    (λx.xx)(λx.xx)
    yields itself.

    Thus giving
    ((lambda (x) (x x)) (lambda (x) (x x)))
    to Scheme doesn't terminate.
    (Needs an `eval-1', maybe??)

    Then
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
    works in Elisp (but obviously not Common Lisp) with lexical binding off.

    Off the top of my head, I don't know how to do it with `macrolet'.

    #Lisp
    #Quines

    @screwlisp

  14. By definition, a quine has no normal form [late correction].
    For a well-known example, a _single_ β-reduction of the (reducible) term
    (λx.xx)(λx.xx)
    yields itself.

    Thus giving
    ((lambda (x) (x x)) (lambda (x) (x x)))
    to Scheme doesn't terminate.
    (Needs an `eval-1', maybe??)

    Then
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
    works in Elisp (but obviously not Common Lisp) with lexical binding off.

    Off the top of my head, I don't know how to do it with `macrolet'.

    #Lisp
    #Quines

    @screwlisp

  15. By definition, a quine has no normal form [late correction].
    For a well-known example, a _single_ β-reduction of the (reducible) term
    (λx.xx)(λx.xx)
    yields itself.

    Thus giving
    ((lambda (x) (x x)) (lambda (x) (x x)))
    to Scheme doesn't terminate.
    (Needs an `eval-1', maybe??)

    Then
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
    works in Elisp (but obviously not Common Lisp) with lexical binding off.

    Off the top of my head, I don't know how to do it with `macrolet'.

    #Lisp
    #Quines

    @screwlisp

  16. By definition, a quine has no normal form [late correction].
    For a well-known example, a _single_ β-reduction of the (reducible) term
    (λx.xx)(λx.xx)
    yields itself.

    Thus giving
    ((lambda (x) (x x)) (lambda (x) (x x)))
    to Scheme doesn't terminate.
    (Needs an `eval-1', maybe??)

    Then
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
    works in Elisp (but obviously not Common Lisp) with lexical binding off.

    Off the top of my head, I don't know how to do it with `macrolet'.

    #Lisp
    #Quines

    @screwlisp

  17. "The following 12-byte program composed of pure #x86 machine code writes itself to standard output when executed in a #DOS environment:
    fc b1 0c ac 92 b4 02 cd 21 e2 f8 c3"

    susam.net/self-printing-machin

    #quines

  18. "The following 12-byte program composed of pure #x86 machine code writes itself to standard output when executed in a #DOS environment:
    fc b1 0c ac 92 b4 02 cd 21 e2 f8 c3"

    susam.net/self-printing-machin

    #quines

  19. "The following 12-byte program composed of pure #x86 machine code writes itself to standard output when executed in a #DOS environment:
    fc b1 0c ac 92 b4 02 cd 21 e2 f8 c3"

    susam.net/self-printing-machin

    #quines

  20. "The following 12-byte program composed of pure #x86 machine code writes itself to standard output when executed in a #DOS environment:
    fc b1 0c ac 92 b4 02 cd 21 e2 f8 c3"

    susam.net/self-printing-machin

    #quines

  21. "The following 12-byte program composed of pure #x86 machine code writes itself to standard output when executed in a #DOS environment:
    fc b1 0c ac 92 b4 02 cd 21 e2 f8 c3"

    susam.net/self-printing-machin

    #quines

  22. Gonna hop on my livestream for a bit. Am I doing Advent of Code, which I am a few days behind on? No, of course not, I'm gonna try to throw together some Python to generate a base64 quine for arbitrary images. Don't know what any of that means? Come along and I'll do my best to explain. First up: sorting the alphabet by mass at stream.cincodenada.com

    #livestream #livecoding #owncast #quines

  23. Gonna hop on my livestream for a bit. Am I doing Advent of Code, which I am a few days behind on? No, of course not, I'm gonna try to throw together some Python to generate a base64 quine for arbitrary images. Don't know what any of that means? Come along and I'll do my best to explain. First up: sorting the alphabet by mass at stream.cincodenada.com

    #livestream #livecoding #owncast #quines

  24. Gonna hop on my livestream for a bit. Am I doing Advent of Code, which I am a few days behind on? No, of course not, I'm gonna try to throw together some Python to generate a base64 quine for arbitrary images. Don't know what any of that means? Come along and I'll do my best to explain. First up: sorting the alphabet by mass at stream.cincodenada.com

    #livestream #livecoding #owncast #quines

  25. Gonna hop on my livestream for a bit. Am I doing Advent of Code, which I am a few days behind on? No, of course not, I'm gonna try to throw together some Python to generate a base64 quine for arbitrary images. Don't know what any of that means? Come along and I'll do my best to explain. First up: sorting the alphabet by mass at stream.cincodenada.com

    #livestream #livecoding #owncast #quines