#quine — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #quine, aggregated by home.social.
-
-
-
Write a program that outputs an exact copy of its source code (without reading any files).
Additional constraints:
- Write the program in portable standard C.
- All output must come from a single
fputs(src, stdout)call wheresrcis an array ofchar. - The main function must be exactly
int main(void) { fputs(src, stdout); return 0; }.
-
Write a program that outputs an exact copy of its source code (without reading any files).
Additional constraints:
- Write the program in portable standard C.
- All output must come from a single
fputs(src, stdout)call wheresrcis an array ofchar. - The main function must be exactly
int main(void) { fputs(src, stdout); return 0; }.
-
On the tangential topic of quines.
Here is my "due diligence".
By the way, in October I realized on my own a quine could be done with
`lambda' and `let', tried to work it out, ran out of time, left it
aside, and, alas, never went back to it...(defun quinep (form)
"Test whether a non-atom FORM evaluates to itself.
Test equality with `equalp' for better coverage (of implementations
that construct structures when reading backquoted expressions)."
;; A justified use of `eval'.
(and (not (atom form))
(equalp form (eval form))));; NB: `*print-pretty*' may affect the printing of backquotes.
(defconstant pitmanual-funnies-eni-mmcm
'(LET ((LET '`(LET ((LET ',LET)) ,LET)))
`(LET ((LET ',LET)) ,LET))
"MMcM's quine.
See <https://maclisp.info/pitmanual/funnies.html#evaluating_new_ideas>,
«MMcM@MIT-AI 09/17/79 15:37:16 Re: ''s».")(defconstant pitmanual-funnies-eni-rwk-kmp
'((LAMBDA (LAMBDA) (LIST (LIST 'LAMBDA '(LAMBDA) LAMBDA)
(LIST 'QUOTE LAMBDA)))
'(LIST (LIST 'LAMBDA '(LAMBDA) LAMBDA)
(LIST 'QUOTE LAMBDA)))
"RWK-KMP's quine.
See <https://maclisp.info/pitmanual/funnies.html#evaluating_new_ideas>,
«KMP,RWK@MIT-ML (Sent by KMP@MIT-ML) 09/18/79 03:37:32».")(assert (quinep pitmanual-funnies-eni-mmcm))
(assert (quinep pitmanual-funnies-eni-rwk-kmp)) -
On the tangential topic of quines.
Here is my "due diligence".
By the way, in October I realized on my own a quine could be done with
`lambda' and `let', tried to work it out, ran out of time, left it
aside, and, alas, never went back to it...(defun quinep (form)
"Test whether a non-atom FORM evaluates to itself.
Test equality with `equalp' for better coverage (of implementations
that construct structures when reading backquoted expressions)."
;; A justified use of `eval'.
(and (not (atom form))
(equalp form (eval form))));; NB: `*print-pretty*' may affect the printing of backquotes.
(defconstant pitmanual-funnies-eni-mmcm
'(LET ((LET '`(LET ((LET ',LET)) ,LET)))
`(LET ((LET ',LET)) ,LET))
"MMcM's quine.
See <https://maclisp.info/pitmanual/funnies.html#evaluating_new_ideas>,
«MMcM@MIT-AI 09/17/79 15:37:16 Re: ''s».")(defconstant pitmanual-funnies-eni-rwk-kmp
'((LAMBDA (LAMBDA) (LIST (LIST 'LAMBDA '(LAMBDA) LAMBDA)
(LIST 'QUOTE LAMBDA)))
'(LIST (LIST 'LAMBDA '(LAMBDA) LAMBDA)
(LIST 'QUOTE LAMBDA)))
"RWK-KMP's quine.
See <https://maclisp.info/pitmanual/funnies.html#evaluating_new_ideas>,
«KMP,RWK@MIT-ML (Sent by KMP@MIT-ML) 09/18/79 03:37:32».")(assert (quinep pitmanual-funnies-eni-mmcm))
(assert (quinep pitmanual-funnies-eni-rwk-kmp)) -
One Open-source Project Daily
An uroboros program with 100+ programming languages
https://github.com/mame/quine-relay
#1ospd #opensource #quine -
One Open-source Project Daily
An uroboros program with 100+ programming languages
https://github.com/mame/quine-relay
#1ospd #opensource #quine -
One Open-source Project Daily
An uroboros program with 100+ programming languages
https://github.com/mame/quine-relay
#1ospd #opensource #quine -
One Open-source Project Daily
An uroboros program with 100+ programming languages
https://github.com/mame/quine-relay
#1ospd #opensource #quine -
Very similar to my interpretation of last year's Genuary 3 "42 Lines of Code" (link below), this code is a "Quine" that outputs itself into a stylized image using SVG curves and gradients.
-
Very similar to my interpretation of last year's Genuary 3 "42 Lines of Code" (link below), this code is a "Quine" that outputs itself into a stylized image using SVG curves and gradients.
-
Constructing the Word's First JPEG XL MD5 Hash Quine
https://stackchk.fail/blog/jxl_hashquine_writeup
#HackerNews #JPEGXL #MD5 #Hash #Quine #Hashing #Programming #HackerNews
-
Constructing the Word's First JPEG XL MD5 Hash Quine
https://stackchk.fail/blog/jxl_hashquine_writeup
#HackerNews #JPEGXL #MD5 #Hash #Quine #Hashing #Programming #HackerNews
-
This is an unbirthday present for @screwlisp,
who posted earlier about quines.To give it as a puzzle at first:
find a Python quine as a string Q such that eval(Q) == Q.
A spoiler to follow.
_________
The term "fixed point" comes to mind. And the Y combinator comes into
this picture as well; wie another day.(Estimating Python's degree of homoiconicity is left as an exercise.)
#ComputerProgramming
#Homoiconicity
#ProgrammingPuzzle
#Puzzle
#Python
#Quine -
This is an unbirthday present for @screwlisp,
who posted earlier about quines.To give it as a puzzle at first:
find a Python quine as a string Q such that eval(Q) == Q.
A spoiler to follow.
_________
The term "fixed point" comes to mind. And the Y combinator comes into
this picture as well; wie another day.(Estimating Python's degree of homoiconicity is left as an exercise.)
#ComputerProgramming
#Homoiconicity
#ProgrammingPuzzle
#Puzzle
#Python
#Quine -
The Law-German wird fer “quine“ wad be "Deern".
---
#DoricWordOfTheDay by Doric Books: #quine (girl, young woman)
#WriteInScots #Doric #Scots -
The Law-German wird fer “quine“ wad be "Deern".
---
#DoricWordOfTheDay by Doric Books: #quine (girl, young woman)
#WriteInScots #Doric #Scots -
Worth noting: there is already a Rockstar quine, and it's actually quite pretty, as are most Rockstar programs.
the world is a sea
burn the world in fire
the song says shout "the world is a sea" with fire, "burn the world in fire", fire, "the song says " with the song, and fire with the song
shout "the world is a sea" with fire, "burn the world in fire", fire, "the song says " with the song, and fire with the song -
Worth noting: there is already a Rockstar quine, and it's actually quite pretty, as are most Rockstar programs.
the world is a sea
burn the world in fire
the song says shout "the world is a sea" with fire, "burn the world in fire", fire, "the song says " with the song, and fire with the song
shout "the world is a sea" with fire, "burn the world in fire", fire, "the song says " with the song, and fire with the song -
I should write a quine in Rockstar that actually outputs itself in reverse, i.e. a quine that only works via back-masking.
-
I should write a quine in Rockstar that actually outputs itself in reverse, i.e. a quine that only works via back-masking.
-
CW: Respond with your personal quine cold
Or, does this #commonLisp #programming #quine even work. Using a lambda instead of a complex format.
Oh, yeah, I guess this one is way better.
(let ((a '(lambda (a) `(progn (print "Side effects") (terpri) (funcall ,a ',a)))))
`(,a ',a)) -
CW: Respond with your personal quine cold
#quine #programming #commonLisp #computerScience #practice
(FORMAT
T
"(FORMAT T ~A~S~A ~0@* ~S (QUOTE ~S) ~S)"
#\"
(QUOTE
(PROGN (terpri)
(princ '|\;\;|) (princ '(can put anything here))
(terpri)
(princ '|\;\;|) (princ '(doublequotes are hard though.))
(terpri)
(FORMAT T ~A~S~A ~0@* ~S (QUOTE ~S) ~S)))
#\")I feel like I forgot how to do this
-
Next episode of Super Tipiak75: all stars in AoC world. ⭐
Day17 was interesting : part1 involved running machine language on an imaginary CPU and lookup output, pretty straightforward. Part2 was about modifying the output in order for the program to output a quine. Pure logic and little coding got me that last star in the end.
I just completed "Chronospatial Computer" - Day 17 - Advent of Code 2024 https://adventofcode.com/2024/day/17
-
Next episode of Super Tipiak75: all stars in AoC world. ⭐
Day17 was interesting : part1 involved running machine language on an imaginary CPU and lookup output, pretty straightforward. Part2 was about modifying the output in order for the program to output a quine. Pure logic and little coding got me that last star in the end.
I just completed "Chronospatial Computer" - Day 17 - Advent of Code 2024 https://adventofcode.com/2024/day/17
-
C. F. Santos が批判する、直観に基づく論理学における「直観」は心理主義的な意味におけるそれだが、哲学における直観は超越論的でありベイズ主義的なものではない。つまり、超越論的な直観と論理体系は整合しうるが、心理主義的な直観と論理体系は独立したものでありうる。これは超越論的言語観と同型をなす。超越論的言語観において、私の言語は世界に等価である。同じように超越論的論理観では、私の直観的論理体系は先験的でしかありえない。論理における反例外主義(AEL)において修正される直観とは、心理主義的な意味におけるそれであり、超越論的なそれではない。
dos Santos, César Frederico (2021). Intuitions, theory choice and the ameliorative character of logical theories. Synthese 199 (5-6):12199-12223.
-
#quine #commonLisp #functionalProgramming #lisp
((LAMBDA (X &AUX (XX (EVAL X))) (LIST (FUNCTION-LAMBDA-EXPRESSION XX) `',X))
'(LAMBDA (X &AUX (XX (EVAL X))) (LIST (FUNCTION-LAMBDA-EXPRESSION XX) `',X)))dedicated to @brokenix . In my last version, I forgot to make the lambda expression list back into a quoted list.
@Reiddragon @mdhughes @louisEDIT: Somehow even more elegant
-
I made an interactive quine.Un fichier HTML qui se met à jour quand vous l'éditez. un peu comme TiddliWiki, mais dans une version minimaliste https://www.pbt.dev/blog/quine/ #html #quine #bizarre #programming
-
I made an interactive quine.Un fichier HTML qui se met à jour quand vous l'éditez. un peu comme TiddliWiki, mais dans une version minimaliste https://www.pbt.dev/blog/quine/ #html #quine #bizarre #programming
-
new #quine in #c, this one works on GCC, clang and TCC, gur initial version was shorter but only works on GCC, so im posting this one, decent improvement from last quine, took me hours to figure out gur last trick to make this work with my wierd arbitary restriction of "all preprocessor commands have to be at gur top of gur file"
-
Nerd alert 🤓🤖
Using #Java 21 preview features, I was able to shrink my Java #quine down to a mere 102 characters:
void main(){var f="void main(){var f=%c%s%1$c;System.out.printf(f,34,f);}";System.out.printf(f,34,f);}
A quine is a programm that takes no input and outputs its own source code (without using file operations).
See examples from Java 1.0 to Java 21 here: https://github.com/thmuch/java-quine
-
Nerd alert 🤓🤖
Using #Java 21 preview features, I was able to shrink my Java #quine down to a mere 102 characters:
void main(){var f="void main(){var f=%c%s%1$c;System.out.printf(f,34,f);}";System.out.printf(f,34,f);}
A quine is a programm that takes no input and outputs its own source code (without using file operations).
See examples from Java 1.0 to Java 21 here: https://github.com/thmuch/java-quine
-
Markdown support in the speedata Publisher and a layout “quine”. New blog post at https://news.speedata.de/2024/03/01/markdown/
-
Quine in typst, why not? It even does syntax highlighting! https://typst.app/project/rIASwtB7-l6qkosx06wNzO #typst #quine
-
𝗪𝗜𝗞𝗜𝗣𝗘𝗗𝗜𝗔'𝗦 𝗙𝗘𝗔𝗧𝗨𝗥𝗘𝗗 𝗔𝗥𝗧𝗜𝗖𝗟𝗘
✧ Quine–Putnam indispensability argument ✧
The Quine–Putnam indispensability argument reasons that we should believe in abstract mathematical objects such as numbers and sets because mathematics is indispensable to science. One of the most important ideas in the philosophy of mathematics, it is credited to W. V. Quine and Hilary...
#Quine #Putnam #PenelopeMaddy #HartryField #Wikipedia
https://en.wikipedia.org/wiki/Quine%E2%80%93Putnam_indispensability_argument -
Last week I couldn't convince my brain to do work I'd get paid for, so instead I wasted a day writing a "git quine."
It's a node script that, when run, outputs the short hash of its `head` commit. The script itself contains its own short hash.
-
Homework problem: do this with GHC https://research.swtch.com/nih
-
“Are attitudes more resistant to change when they are more central to a belief system?”
Researchers changed conservatives’ and liberals’ attitudes (!) using moral reframing.
However, they found “no evidence that central attitudes were more difficult to change than peripheral attitudes”.
-
@ignaloidas @OscarCunningham @ideoforms That would be a #quine, which is apparently possible in any Turing-complete language, so... https://en.wikipedia.org/wiki/Quine_(computing)
-
svg8.svg — Code is numbers.
Edition of 10
(Final version)Each character of the source code is remapped to a hexadecimal digit (0-F) with an added offset over time. Each line of code will be visited once.
Project page
↓
http://ertdfgcvb.ch/+/svgRealtime version
↓
https://objkt.com/asset/hicetnunc/815103 -
#quine #gopher #CommonLisp #question (s)
I juiced up my eve quine (now just a quine in that she implements the 'MAKE-LOAD-FORM generic) class with pubsub and class-cloning superclasses
gopher://tilde.institute/0/~screwtape/216933377-eve-quine.lisp
and I'm not sure if I remember how to do an in-lisp-image #pubsub . I ended up having a :shared allocation weak-hash-table and iterating over it to find someone in particular's children.
???
@ldbeth @mhcat @svetlyak40wt @galdor how to do CLOS pubsub?