Some notes on computer science, mostly online sources.
Load racket package, when #lang sicp
is used
- load a whole package
(#%require <racket package name>) ;; e.g. (#%require racket/base) ; load racket base (#%require sicp-pict) ; load sicp picture package
- load selected identifiers from package
(#%require (only <racket package name> <identifiers, space seperated>)) ;; e.g. ; load `provide` and `all-defined-out` from racket base, ; and load these two only (#%require (racket/base provide all-defined-out))
Load sub file, when #lang sicp
is used
- export identifiers in the included sub file
;; sub file ; export selected identifiers (provide <identifiers, space seperated>) ; export all defined identifiers in the current file (provide (all-defined-out)) ;; e.g. 1 (#%require (only racket/base provide)) (provide square double) (define (square x) (* x x)) (define (double x) (+ x x)) ;; e.g. 2 (#%require (only racket/base provide all-defined-out)) (provide (all-defined-out)) (define (square x) (* x x)) (define (double x) (+ x x)) (define (halve x) (if (even? x) (/ x 2) (error "ERROR: invalid input, not even")))
- load sub file in the main file
;; main file (#%require "<path to sub file>") ;; e.g. ; load file with relative path (#%require "exercise_1.43.rkt") (#%require "../chapter02/exercise_2.20.rkt")
Run code only when current file is not required as a module
- This is similar to
if __name__ == "__main__":
in python. - See doc of
main
submoduleand answer
#lang sicp
(#%require (only racket/base module+))
(module+ main
...) ; the body accumulates
; and `main` is executed at the end of current module
- Code Style from Community Scheme Wiki
- Comment Style from Community Scheme Wiki
- Choice of using dialect of Scheme used by SICP:
- MIT Scheme maintained by GNU, or
- SICP collections as a package of Racket
Textbook
The C Programming Language, 2nd Edition, by Kernighan and Ritchie (K&R2)
- Solutions provided by clc-wiki, an offshoot of the comp.lang.c newsgroup
Discussion
- How to C in 2016, by Matt
- Critique, by Keith Thompson
-
Specifications and Implementations
- CommonMark
- spec https://spec.commonmark.org/
- spec repo https://github.com/commonmark/commonmark-spec/
- online demo https://spec.commonmark.org/dingus/
- library https://github.com/commonmark/cmark
- GitHub Flavored Markdown (GFM)
- spec https://github.github.com/gfm/
- spec source https://github.com/github/cmark-gfm/blob/master/test/spec.txt (got from https://talk.commonmark.org/t/location-of-gfm-spec/4250 and github/cmark-gfm#93)
- library https://github.com/github/cmark-gfm
- some extra (DOM-based?) GitHub extensions are not included
- autolink extension skips
ftp://
uris github/cmark-gfm#177 - alerts not included github/cmark-gfm#350
- autolink extension skips
- Relation between CommonMark and GFM
- GFM spec and library are both based on CommonMark's https://github.blog/2017-03-14-a-formal-spec-for-github-markdown/
- 0.29-gfm (2019-04-06) is based on CommonMark v0.29 (2019-04-06)
- in Oct 2023, the latest CommonMark version is v0.30 (2021-06-19)
- will GFM spec sync with that of CommonMark? github/cmark-gfm#259 (closed by issue author on 2023-10-03 with disappointment)
- GitLab Flavored Markdown (GLFM) https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/
- "Markdown Variants" registry established by IANA (Internet Assigned Numbers Authority)
https://www.iana.org/assignments/markdown-variants/markdown-variants.xhtml
- mentioned in RFC7763 (informational), The text/markdown Media Type https://www.rfc-editor.org/rfc/rfc7763 https://datatracker.ietf.org/doc/html/rfc7763
- saw in https://sspai.com/prime/story/free-markdown-editor-2023
- CommonMark
-
babelmark3, online comparison among Markdown implementations https://babelmark.github.io/
- last updated Oct 2018, main author remains active on GitHub
- saw in https://talk.commonmark.org/t/is-first-underdefined-in-the-commonmark-spec/1276/3
-
Adoption
- As of June 20, 2020, all Stack Overflow sites are on CommonMark.
- Default link colors (ref to HTML Spec, answer)
:link { color: #0000EE; } :visited { color: #551A8B; } :link:active, :visited:active { color: #FF0000; } :link, :visited { text-decoration: underline; cursor: pointer; }
- Introduction: wikipedia page
- Specification:
- Lex used by GitHub: language-grammars by Alhadis, not finished yet (19 Aug 27)
- Introduction: wikipedia page
- Specifications:
- ISO/IEC 14977:1996, not recommended
- Variant used by XML Spec. 5th
- Lex used by GitHub: language-grammars by Alhadis, not finished yet (19 Aug 27)
- Subtitle: With Application to Understanding Data
- Page on MIT Press, containing errata
- Page of book author John Guttag
- Online full-text, both 1st (with full solutions) and 2nd editions.
- From slides of talk Matthias Felleisen gave at RacketCon 2011, there is a four-books plan with HtDP and How to Design Components (now called Classes, see webpage of HtDC) the first two.
- Scheme vs Python (discussions about learning SICP with Scheme or with Python)
- Explanation given by Brian Harvey, staff of Berkeley course 61A
- Articles (1, 2) based on a talk given by Gerry Sussman, one of the author of book, at 2016 NYC Lisp meet-up
- Open-Sourced Book and solutions
- Original HTML version provided by The MIT Press
- Nice-looking HTML version with modern HTML techniques, provided by Andres Raba with EPUB and PDF versions as well
- Full solution with discussions and explanations, provided by Community Scheme Wiki
- Readings
- Iteration and tail recursive
- SICP Iteration Exercise: http://wiki.c2.com/?SicpIterationExercise
- An Interactive Change-Counting Procedure: https://logicgrimoire.wordpress.com/2013/02/16/an-iterative-change-counting-procedure/
- Attempting to Count Change, Iteratively: https://logicgrimoire.wordpress.com/2013/01/27/attempting-to-count-change-iteratively/
- Iteration and tail recursive
- HTML version, PDF version, and a link to a series of lecture videos can be found on the main page of this unpublished 31-chapter book.
- A partial simplified Chinese translation, covering the whole 10 chapters of the first part, is contributed by Garfileo.
- 1st edition (1990)
- 2nd edition (2008)
- Chinese translation project (2e)
- Springer (2006)
- Book page on MS research, PDF available
- Authors: Aston Zhang, Zack C. Lipton, Mu Li, and Alex J. Smola
- Introduction: A free and interactive deep learning book for students, engineers, and researchers.
- Online version: en, zh-cn
When SHOW DATABASES;
showing
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
after updating the mysql
, run
mysql_upgrade --force -uroot -p
to upgrade tables.
Related links:
- Column count of mysql.user is wrong. Expected 42, found 44. - Answer on StackOverflow
- Can't find mysql.infoschema after update from 5.7 - Answer on StackOverflow
- 4.4.5 mysql_upgrade - Check and Upgrade MySQL Tables - MySql Ref Manual