C

{"content":{"id":1076,"title":"Weekly Links - Oh Lord Don't Let Them Drop That Atomic Bomb on Me Edition","body":"\u003cul\u003e\r\n\u003cli\u003e\r\nRemember when Rosanne got Tom Arnold his own show? \u003ca href=\"https://youtu.be/8Q18uKadksk\"\u003eA very tongue-in-cheek ad\u003c/a\u003e for the show, followed by Stephen King advertising the new Dark Tower book. \r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nA Tumblr entirely dedicated to \u003ca href=\"https://antiriker.tumblr.com/\"\u003eanti-Riker memes\u003c/a\u003e. Reading it through, I get the feeling that the maintainer doesn't actually hate Riker at all!\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nOn a related note, what are the chances that the new Picard show's secret plot twist is time travel and/or time travelling into the other timeline's past? Star Trek's last non-prequel was eighteen years ago and they've now got countless prequels-to-prequels. They seem pretty committed to being prequel-only at this point.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nIn my opinion, the greatest - or at least greatest looking - web comic of all time is \u003ca href=\"https://www.alessonislearned.com/\"\u003eA Lesson Is Learned But The Damage Is Irreversible\u003c/a\u003e, which was active in the 00s. The illustrator later did the artwork for the game Braid.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nSome extremely brave scientists in India blog about \u003ca href=\"https://pogirigowrishankar.wordpress.com/2011/04/24/king-cobra-nests/\"\u003eresearching King Cobra nests\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://www.lysator.liu.se/c/ten-commandments.html\"\u003eThe Ten C Commandments\u003c/a\u003e. Not to be confused with the Biggie Smalls song.\r\n\u003c/li\u003e\r\n\u003c/ul\u003e","publication_date":"2020-01-06T00:00:00.000Z","created_at":"2020-01-05T18:15:57.000Z","updated_at":"2020-01-05T18:22:47.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=books\"\u003ebooks\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=scary\"\u003escary\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=weekly_links\"\u003eweekly_links\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=tv\"\u003etv\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=sitcoms\"\u003esitcoms\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=star_trek\"\u003estar_trek\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=tng\"\u003etng\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=old_memes\"\u003eold_memes\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=games\"\u003egames\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=old_comics\"\u003eold_comics\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=the_zeroes\"\u003ethe_zeroes\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=snakes\"\u003esnakes\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=animals\"\u003eanimals\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e"}

Weekly Links - Oh Lord Don't Let Them Drop That Atomic Bomb on Me Edition

  • Remember when Rosanne got Tom Arnold his own show? A very tongue-in-cheek ad for the show, followed by Stephen King advertising the new Dark Tower book.
  • A Tumblr entirely dedicated to anti-Riker memes. Reading it through, I get the feeling that the maintainer doesn't actually hate Riker at all!
  • On a related note, what are the chances that the new Picard show's secret plot twist is time travel and/or time travelling into the other timeline's past? Star Trek's last non-prequel was eighteen years ago and they've now got countless prequels-to-prequels. They seem pretty committed to being prequel-only at this point.
  • In my opinion, the greatest - or at least greatest looking - web comic of all time is A Lesson Is Learned But The Damage Is Irreversible, which was active in the 00s. The illustrator later did the artwork for the game Braid.
  • Some extremely brave scientists in India blog about researching King Cobra nests.
  • The Ten C Commandments. Not to be confused with the Biggie Smalls song.
{"content":{"id":1058,"title":"'Build Your Own Lisp' Solutions: 6.6","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Change the grammar to recognize decimal numbers such as 0.01, 5.21, or 10.2.\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e\" \\\r\nnumber : /-?[0-9]+(.[0-9]+)*/ ; \\\r\noperator : 'add' | 'sub' | 'mul' | 'div'; \\\r\nexpr : \u0026lt;number\u003e | '(' \u0026lt;operator\u003e \u0026lt;expr\u003e+ ')' ; \\\r\nlispy : /^/ \u0026lt;operator\u003e \u0026lt;expr\u003e+ /$/ ; \\\r\n\"\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2020-01-04T00:00:00.000Z","created_at":"2019-12-10T00:09:33.000Z","updated_at":"2020-07-06T19:13:57.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.6

Q: Change the grammar to recognize decimal numbers such as 0.01, 5.21, or 10.2.

A:

"                                                   \
number   : /-?[0-9]+(.[0-9]+)*/ ;                   \
operator : 'add' | 'sub' | 'mul' | 'div';           \
expr     : <number> | '(' <operator> <expr>+ ')' ;  \
lispy    : /^/ <operator> <expr>+ /$/ ;             \
"

{"content":{"id":1023,"title":"'Build Your Own Lisp' Solutions: 6.5","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e › Change the grammar to recognise operators written in textual format 'add', 'sub', 'mul', 'div'.\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e\" \\\r\nnumber : /-?[0-9]+/ ; \\\r\noperator : 'add' | 'sub' | 'mul' | 'div'; \\\r\nexpr : \u0026lt;number\u003e | '(' \u0026lt;operator\u003e \u0026lt;expr\u003e+ ')' ; \\\r\nlispy : /^/ \u0026lt;operator\u003e \u0026lt;expr\u003e+ /$/ ; \\\r\n\"\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-12-04T00:00:00.000Z","created_at":"2019-11-04T20:51:40.000Z","updated_at":"2019-11-04T21:00:09.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.5

Q: › Change the grammar to recognise operators written in textual format 'add', 'sub', 'mul', 'div'.


A:

"                                                   \
number   : /-?[0-9]+/ ;                             \
operator : 'add' | 'sub' | 'mul' | 'div';           \
expr     : <number> | '(' <operator> <expr>+ ')' ;  \
lispy    : /^/ <operator> <expr>+ /$/ ;             \
"

{"content":{"id":1015,"title":"'Build Your Own Lisp' Solutions: 6.4","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Change the grammar to add a new operator such as '%'.\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e\" \\\r\nnumber : /-?[0-9]+/ ; \\\r\noperator : '+' | '-' | '*' | '/' | '%'; \\\r\nexpr : \u0026lt;number\u003e | '(' \u0026lt;operator\u003e \u0026lt;expr\u003e+ ')' ; \\\r\nlispy : /^/ \u0026lt;operator\u003e \u0026lt;expr\u003e+ /$/ ; \\\r\n\"\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-11-27T00:00:00.000Z","created_at":"2019-10-28T19:56:26.000Z","updated_at":"2019-10-28T20:03:09.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.4

Q: Change the grammar to add a new operator such as '%'.


A:

"                                                   \
number   : /-?[0-9]+/ ;                             \
operator : '+' | '-' | '*' | '/' | '%';             \
expr     : <number> | '(' <operator> <expr>+ ')' ;  \
lispy    : /^/ <operator> <expr>+ /$/ ;             \
"

{"content":{"id":982,"title":"'Build Your Own Lisp' Solutions: 6.3","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Write a regular expression matching pit, pot and respite but not peat, spit, or part.\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e# This works, but is a weird answer to a weird exercise.\r\n/(^|res)p[io]/\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-11-13T00:00:00.000Z","created_at":"2019-10-16T01:07:00.000Z","updated_at":"2020-07-13T00:22:16.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.3

Q: Write a regular expression matching pit, pot and respite but not peat, spit, or part.

A:

# This works, but is a weird answer to a weird exercise.
/(^|res)p[io]/

{"content":{"id":927,"title":"'Build Your Own Lisp' Solutions: 6.2","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Write a regular expression matching strings of consecutive a and b such as ababab or aba.\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e/(ab)/\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-10-09T00:00:00.000Z","created_at":"2019-09-08T19:17:57.000Z","updated_at":"2019-09-08T19:17:57.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.2

Q: Write a regular expression matching strings of consecutive a and b such as ababab or aba.


A:

/(ab)/

{"content":{"id":973,"title":"Weekly Links - Our Glorious Future Edition","body":"\u003cul\u003e\r\n\u003cli\u003e\r\nHave you heard of xlogo? If you use the X Window System, \u003ca href=\"https://simont.dreamwidth.org/242297.html\"\u003ethis is pretty neat\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nAncient Clickhole of the week: \u003ca href=\"https://www.clickhole.com/these-elderly-people-s-stories-of-an-early-unsafe-vers-1825126728\"\u003eThese Elderly People’s Stories Of An Early, Unsafe Version Of Disneyland Will Terrify You\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nC gets a lot of shit on the Internet, yet still persists and thrives. Your operating system is running C code right now, for example. For all its cruft and quirks, there are just certain niches that C fills which languages like Rust unequivocally do not, no matter how many think pieces are written. It also requires discipline and planning. Here's a lighthearted \u003ca href=\"https://www.lysator.liu.se/c/ten-commandments.html\"\u003eTen Commandments Of C\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"http://www.weirduniverse.net/blog/comments/rabbit\"\u003eIncredible short film\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://github.com/FoxDotBuild/woof-alert\"\u003eA dog collar that converts all barks to emails\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nValve is a company that went from rich to ridonculously rich due to a side project that was the product of their bizarrely relaxed organizational model. Their \u003ca href=\"https://steamcdn-a.akamaihd.net/apps/valve/Valve_NewEmployeeHandbook.pdf\"\u003eemployee handbook\u003c/a\u003e is both interesting to read and very well-designed.\r\n\u003c/li\u003e\r\n\u003c/ul\u003e","publication_date":"2019-10-07T00:00:00.000Z","created_at":"2019-10-06T16:56:01.000Z","updated_at":"2019-10-06T17:38:27.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=weekly_links\"\u003eweekly_links\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=ancient_clickhole\"\u003eancient_clickhole\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=horror\"\u003ehorror\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=unix\"\u003eunix\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=linux\"\u003elinux\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=games\"\u003egames\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=design\"\u003edesign\u003c/a\u003e"}

Weekly Links - Our Glorious Future Edition

{"content":{"id":925,"title":"Weekly Links - Geometry Edition","body":"\u003cul\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://youtu.be/qpb-YflRn0s\"\u003eSteamed Dagoth Ur\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"http://www.campin.me.uk/Music/Ocarina/\"\u003eHyper-Detailed, Picture-Filled Pre-War History Of The Ocarina\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://makeabox.io/\"\u003eAutomatic Box Plan Generator\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://github.com/git/git/blob/master/banned.h\"\u003ebanned.h\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://www.clickhole.com/gut-wrenching-italian-waiter-grinds-fresh-black-pepper-1825126712\"\u003eGut-wrenching: Italian Waiter Grinds Fresh Black Pepper Onto Daughter’s Grave\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nByrne's Euclid is a strange Victorian edition of Euclid using colours instead of letters. I'm not sure whether it's really easier for children, but it is interesting to look at. Some excellent person made a \u003ca href=\"https://www.c82.net/euclid/\"\u003eclassy online edition\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003c/ul\u003e","publication_date":"2019-09-08T00:00:00.000Z","created_at":"2019-09-07T19:57:37.000Z","updated_at":"2019-09-07T20:13:41.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=weekly_links\"\u003eweekly_links\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=grand_and_intoxicating\"\u003egrand_and_intoxicating\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=music\"\u003emusic\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=ocarina\"\u003eocarina\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=woodworking\"\u003ewoodworking\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=ancient_clickhole\"\u003eancient_clickhole\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=mathematics\"\u003emathematics\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=nineteenth_century\"\u003enineteenth_century\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=greece\"\u003egreece\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=ancient\"\u003eancient\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=italy\"\u003eitaly\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=food\"\u003efood\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=ireland\"\u003eireland\u003c/a\u003e"}

Weekly Links - Geometry Edition

{"content":{"id":871,"title":"'Build Your Own Lisp' Solutions: 6.1","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Write a regular expression matching strings of all a or b such as aababa or bbaa.\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e/^(a|b)+$/\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-09-05T00:00:00.000Z","created_at":"2019-08-06T21:35:19.000Z","updated_at":"2020-10-02T16:44:39.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 6.1

Q: Write a regular expression matching strings of all a or b such as aababa or bbaa.

A:

/^(a|b)+$/

{"content":{"id":917,"title":"Weekly Links - Drawing Edition","body":"\u003cimg src=\"/uploads/30f.png\" class=\"card-image\"\u003e\r\n\u003cbr\u003e\r\n\u003cbr\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\r\nFrom 1949: \u003ca href=\"https://archive.org/details/1015DrawingForBeginnersPart3TheSquare\"\u003eDrawing for Beginners Part 3: The Square\u003c/a\u003e. Surprisingly relaxing. Thank God for not renewing copyrights.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://stackoverflow.com/questions/31888422/what-does-the-first-c-stand-for-in-calloc\"\u003eNobody knows what the 'c' in calloc stands for\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://danso.ca/blog/order-of-operations/\"\u003e8/2(2*2) = 1\u003c/a\u003e. A response to some recent heated Internet BEDMAS debates.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nWeird Universe asks which is more boring: \u003ca href=\"http://www.weirduniverse.net/blog/comments/country_farming_innovations_of_the_modern_tractor_1955_1959\"\u003eInnovations of the Modern Tractor, or Timber Bridge Inspection in Oregon\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nOldie but goodie: \u003ca href=\"http://typicalprogrammer.com/introduction-to-abject-oriented-programming\"\u003eIntroduction to Abject-Oriented Programming\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://www.filmsforaction.org/articles/comic-if-bart-simpson-and-chris-griffin-went-to-couples-therapy/\"\u003eThe full version of the comic pictured above\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003c/ul\u003e","publication_date":"2019-09-01T00:00:00.000Z","created_at":"2019-08-31T16:04:55.000Z","updated_at":"2019-09-01T01:04:03.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=weekly_links\"\u003eweekly_links\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=drawing\"\u003edrawing\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=twentieth_century\"\u003etwentieth_century\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=mathematics\"\u003emathematics\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=farms\"\u003efarms\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=old_comics\"\u003eold_comics\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=tv\"\u003etv\u003c/a\u003e"}

Weekly Links - Drawing Edition



{"content":{"id":806,"title":"'Build Your Own Lisp' Solutions: 5.4","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Describe textually a grammar for decimal numbers such as \u003ci\u003e0.01\u003c/i\u003e or \u003ci\u003e52.221\u003c/i\u003e.\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e// Using the same system he's given us to describe decimals:\r\n\" \\\r\n digit : \\\"0\\\" | \\\"1\\\" \\\"2\\\" | \\\"3\\\" \\\"4\\\" \\\r\n | \\\"5\\\" | \\\"6\\\" \\\"7\\\" | \\\"8\\\" \\\"9\\\"; \\\r\n number : \u0026lt;digit\u0026gt;+; \\\r\n decimal : \u0026lt;number\u0026gt;+\\.\u0026lt;number\u0026gt;+; \\\r\n\"\r\n/* The URL example is essentially the same, but with a all the letters \r\n * of the alphabet. The rest of the questions in the chapter are soft\r\n * enough to be left to the interested reader. */\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e","publication_date":"2019-07-26T00:00:00.000Z","created_at":"2019-06-28T18:09:04.000Z","updated_at":"2020-08-27T15:39:55.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 5.4

Q: Describe textually a grammar for decimal numbers such as 0.01 or 52.221.

A:

// Using the same system he's given us to describe decimals:
"                                             \
 digit   : \"0\" | \"1\" \"2\" | \"3\" \"4\"  \
         | \"5\" | \"6\" \"7\" | \"8\" \"9\"; \
 number  : <digit>+;                          \
 decimal : <number>+\.<number>+;              \
"
/* The URL example is essentially the same, but with a all the letters 
 * of the alphabet. The rest of the  questions in the chapter are soft
 * enough to be left to the interested reader. */

{"content":{"id":807,"title":"Weekly Links - Second Death Of Latin Edition","body":"\u003cul\u003e\r\n\u003cli\u003e\r\nRadio Finland has been running a \u003ca href=\"https://areena.yle.fi/1-1931339\"\u003eLatin news service\u003c/a\u003e for 30 years. In Canada, they used to play it as about two or three in the morning. It was very neutral world news, with a charmingly disproportional amount of Finnish politics. They'd been threatening to cancel it for years and finally it happened. Some people are trying to \u003ca href=\"https://nuntiilatini.com/\"\u003econtinue it in their free time\u003c/a\u003e and I wish them the best of luck.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nI quit watching SNL in the Jimmy Fallon years, for obvious reasons. Now I'm finding out that - thanks to Jimmy Fallon - I missed out on all kinds of great gems, like \u003ca href=\"https://youtu.be/MJEAGd1bQuc\"\u003eMeet Your Second Wife\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nThe standard C library has a simple reversible encryption function called \u003ca href=\"https://linux.die.net/man/3/memfrob\"\u003ememfrob\u003c/a\u003e which XORs a string with 42.\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nSomeone went through the effort of writing \u003ca href=\"https://github.com/froggey/Mezzano/\"\u003ea graphical operating system in Common LISP\u003c/a\u003e. Can you imagine doing that?\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\n\u003ca href=\"https://shkspr.mobi/blog/2019/06/the-worst-morale-boosting-gesture-ive-experienced/\"\u003e\"The worst morale boosting gesture I've experienced\"\u003c/a\u003e\r\n\u003c/li\u003e\r\n\u003cli\u003e\r\nThere's a gigantic culture of programmers with whom I have no contact whatsoever. I don't understand their lives, which seem gruesome and difficult and cursed, even though they seem endlessly optimistic and perfectly happy. It's like when you find out that a lot of poverty-torn developing countries have low suicide rates. In DOTNET, \u003ca href=\"https://github.com/dotnet/try/issues/290\"\u003eMath.Round opens the browser print dialog\u003c/a\u003e.\r\n\u003c/li\u003e\r\n\u003c/ul\u003e","publication_date":"2019-06-30T00:00:00.000Z","created_at":"2019-06-29T17:27:28.000Z","updated_at":"2019-06-29T17:45:45.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=weekly_links\"\u003eweekly_links\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=latin\"\u003elatin\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=finland\"\u003efinland\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=comedy\"\u003ecomedy\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=douglas_adams\"\u003edouglas_adams\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=common_lisp\"\u003ecommon_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=hype\"\u003ehype\u003c/a\u003e"}

Weekly Links - Second Death Of Latin Edition

  • Radio Finland has been running a Latin news service for 30 years. In Canada, they used to play it as about two or three in the morning. It was very neutral world news, with a charmingly disproportional amount of Finnish politics. They'd been threatening to cancel it for years and finally it happened. Some people are trying to continue it in their free time and I wish them the best of luck.
  • I quit watching SNL in the Jimmy Fallon years, for obvious reasons. Now I'm finding out that - thanks to Jimmy Fallon - I missed out on all kinds of great gems, like Meet Your Second Wife.
  • The standard C library has a simple reversible encryption function called memfrob which XORs a string with 42.
  • Someone went through the effort of writing a graphical operating system in Common LISP. Can you imagine doing that?
  • "The worst morale boosting gesture I've experienced"
  • There's a gigantic culture of programmers with whom I have no contact whatsoever. I don't understand their lives, which seem gruesome and difficult and cursed, even though they seem endlessly optimistic and perfectly happy. It's like when you find out that a lot of poverty-torn developing countries have low suicide rates. In DOTNET, Math.Round opens the browser print dialog.
{"content":{"id":722,"title":"'Build Your Own Lisp' Solutions: 5.3","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Why are there back slashes \u003ci\u003e\\\u003c/i\u003e at the end of the line in the grammar?\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e C will ignore a combination of a newline followed by \u003ci\u003e\\\u003c/i\u003e, which lets you format long strings more nicely. An example:\r\n\u003cpre\u003e\u003ccode class=\"cpp\"\u003e#include \u0026ltstdio.h\u0026gt\r\n\r\nint main(void)\r\n{\r\n /* If you count the spaces here and in the resulting output, there are\r\n * 11. The \\ and the newline are dropped. */\r\n printf(\"this is line one \\\r\n and this is line two\\n\");\r\n\r\n return 0;\r\n}\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003cpre\u003e\u003ccode class=\"lisp\"\u003ethis is line one and this is line two\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003c/p\u003e\r\n\u003c!--\r\n\u003cstyle\u003e\r\ni { background: white; font-style: normal; margin-left: 3px; margin-right: 3px }\r\n\u003c/style\u003e\r\n--\u003e","publication_date":"2019-06-20T00:00:00.000Z","created_at":"2019-05-19T18:52:47.000Z","updated_at":"2019-06-22T02:53:03.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 5.3

Q: Why are there back slashes \ at the end of the line in the grammar?


A: C will ignore a combination of a newline followed by \, which lets you format long strings more nicely. An example:

#include <stdio.h>

int main(void)
{
  /* If you count the spaces here and in the resulting output, there are
   * 11. The \ and the newline are dropped. */
  printf("this is line one \
          and this is line two\n");

  return 0;
}
this is line one           and this is line two

{"content":{"id":721,"title":"'Build Your Own Lisp' Solutions: 5.2","body":"\u003cdiv class=\"card-image-caption\"\u003e(5.1 is a fun exercise and left to the reader)\u003c/div\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e Why are there back slashes \u003ci\u003e\\\u003c/i\u003e in front of the quote marks \u003ci\u003e\"\u003c/i\u003e in the grammar?\u003c/p\u003e\r\n\u003cbr\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e So the C compiler doesn't mistake them for quotation marks which end the string.\r\n\u003c/p\u003e\r\n\u003c!--\r\n\u003cstyle\u003e\r\ni { background: white; font-style: normal; margin-left: 3px; margin-right: 3px }\r\n\u003c/style\u003e\r\n--\u003e","publication_date":"2019-06-19T00:00:00.000Z","created_at":"2019-05-19T16:50:55.000Z","updated_at":"2019-06-22T02:53:32.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 5.2

(5.1 is a fun exercise and left to the reader)

Q: Why are there back slashes \ in front of the quote marks " in the grammar?


A: So the C compiler doesn't mistake them for quotation marks which end the string.

{"content":{"id":705,"title":"'Build Your Own Lisp' Solutions: 4.9","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e If \u003ci\u003e_WIN32\u003c/i\u003e is defined on windows, what is defined for Linux or Mac?\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e \u003ci\u003e__linux__\u003c/i\u003e, and \u003ci\u003e__APPLE__\u003c/i\u003e, not to mention \u003ci\u003e__ANDROID__\u003c/i\u003e (which is a type of \u003ci\u003e__linux__\u003c/i\u003e, so something like \u003ci\u003e__linux__ \u0026\u0026 !__ANDROID__\u003c/i\u003e is possible).\u003c/p\u003e\r\n\u003cstyle\u003e\r\ni { background: white; font-style: normal; margin-left: 3px; margin-right: 3px }\r\n\u003c/style\u003e","publication_date":"2019-06-08T00:00:00.000Z","created_at":"2019-05-09T21:47:37.000Z","updated_at":"2020-07-06T03:21:32.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 4.9

Q: If _WIN32 is defined on windows, what is defined for Linux or Mac?

A: __linux__, and __APPLE__, not to mention __ANDROID__ (which is a type of __linux__, so something like __linux__ && !__ANDROID__ is possible).

{"content":{"id":688,"title":"'Build Your Own Lisp' Solutions: 4.8","body":"\u003cp\u003e\u003cb\u003eQ:\u003c/b\u003e What does the preprocessor command \u003ci\u003e#define\u003c/i\u003e do?\u003c/p\u003e\r\n\u003cp\u003e\u003cb\u003eA:\u003c/b\u003e It creates a macro, which is to say, it let's you associate a word with an expression. Before compiling your code, the precompiler will replace every instance of that word with that expression. While most macros you see are quite simple, you can do pretty amazing things with them. See \u003ca href=\"https://gcc.gnu.org/onlinedocs/cpp/Macros.html\"\u003ehere\u003c/a\u003e for a detailed reference.\u003c/p\u003e","publication_date":"2019-06-04T00:00:00.000Z","created_at":"2019-05-04T20:21:30.000Z","updated_at":"2020-07-14T18:21:02.000Z","user_id":1,"rating":null},"tags":"\u003ca class=\"changeable-title\" href=\"/q?tag=c\"\u003ec\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=lisp\"\u003elisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=build_your_own_lisp\"\u003ebuild_your_own_lisp\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=answers\"\u003eanswers\u003c/a\u003e \u003ca class=\"changeable-title\" href=\"/q?tag=programming\"\u003eprogramming\u003c/a\u003e"}

'Build Your Own Lisp' Solutions: 4.8

Q: What does the preprocessor command #define do?

A: It creates a macro, which is to say, it let's you associate a word with an expression. Before compiling your code, the precompiler will replace every instance of that word with that expression. While most macros you see are quite simple, you can do pretty amazing things with them. See here for a detailed reference.