Skip to content

Instantly share code, notes, and snippets.

@sogaiu
sogaiu / non-goals-c++.md
Created May 16, 2025 12:29
Non-goals Section of "P2137R0 Goals and priorities for C++"

2. Non-goals

There are common or expected goals of many programming languages that we explicitly call out as non-goals for the C++ language from our perspective. That doesn’t make these things bad in any way, but reflects the fact that they do not provide meaningful value to us and come with serious costs and/or risks.

...

2.1 Stable language and library ABI

2.2 Backwards or forwards compatibility

1930
1950
1958
1966
1970
1974
1982
1986
1990
@sogaiu
sogaiu / data-format.janet
Created May 12, 2025 07:28
examples of pretty printing janet data
(comment
(def src-0
``
@{main @{:doc "(main)\n\n" :source-map ("dogs.janet" 11 1) :value <function main>} odin @{:source-map ("dogs.janet" 1 1) :value @{:name "Odin" :type "German Shepherd"}} people @{:source-map ("dogs.janet" 4 1) :value ({:dogs (@{:name "Skadi" :type "German Shepherd"} @{:name "Odin" :type "German Shepherd"}) :name "ian"} {:dogs (@{:name "Skadi" :type "German Shepherd"} @{:name "Odin" :type "German Shepherd"}) :name "kelsey"} {:dogs () :name "jeffrey"})} skadi @{:source-map ("dogs.janet" 2 1) :value @{:name "Skadi" :type "German Shepherd"}} :current-file "dogs.janet" :macro-lints @[] :source "dogs.janet"}
``)
(fmt src-0)
# =>
@``
@sogaiu
sogaiu / remarkable-parse-trees.janet
Last active May 11, 2025 09:47
remarkable parse trees
(import ./remarkable :as r)
(comment
# extracted from jurl smtp.janet new's docstring
(def false-link-minimal "<[email protected]>")
(r/parse-md false-link-minimal)
# =>
[:document @{:container? true :open? true}
2345 ./github.com/stsewd/tree-sitter-comment/src/tree_sitter_comment/parser.c
3348 ./github.com/rschiang/tree-sitter-qml/src/parser.c
6677 ./github.com/tree-sitter-grammars/tree-sitter-yaml/schema/json/src/parser.c
7404 ./github.com/AbstractMachinesLab/tree-sitter-sexp/src/parser.c
7919 ./github.com/Aerijo/tree-sitter-todo/src/parser.c
9422 ./github.com/tree-sitter-grammars/tree-sitter-yaml/schema/core/src/parser.c
12923 ./github.com/amaanq/tree-sitter-rec/src/parser.c
13193 ./github.com/uyha/tree-sitter-eds/src/parser.c
14442 ./github.com/ath3/tree-sitter-passwd/src/parser.c
15421 ./github.com/DerekStride/tree-sitter-math/src/parser.c
@sogaiu
sogaiu / doc-format-loose-list-handling.janet
Last active May 8, 2025 09:35
some examples of doc-format behavior in the realm of loose lists
(comment
# doc-format will transform the following into what looks like a loost list
# but what is actually multiple lists of one item each...
(def case-0-md
``
* A
* B
@sogaiu
sogaiu / loose-list-fun.md
Last active May 7, 2025 10:59
loose lists are affected by blank lines between list items of the same list

Rendered

Sample 1 - Outer List is Loose

  • A

  • B

    • B.1
    • B.2
  • C

@sogaiu
sogaiu / not-parsed-properly.janet
Last active May 7, 2025 09:56
case not handled properly
(comment
(def case-3-md
``
* A
* B
* B.1
* B.2
* C
@sogaiu
sogaiu / doc-parse.janet
Last active May 7, 2025 05:13
experimenting with doc-parse extracted (and slightly modified) from doc-format
# for comparing with version being explored below
(defn doc-parse-original
`Extracted from doc-format`
[str &opt colorize]
(def has-color (if (not= nil colorize)
colorize
(dyn *doc-color*)))
# Terminal codes for emission/tokenization