-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: guile, penrose-notation, bookmarks
- Loading branch information
Showing
13 changed files
with
131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Url: https://www.mathstat.dal.ca/~selinger/papers.html | ||
Description: Selinger Papers | ||
Tags: papers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Url: https://tikz.dev/gd-usage-tikz | ||
Description: TikZ tutorial | ||
Tags: latex | ||
Tags: tikz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
--- | ||
- ## Contents | ||
|
||
There are #441 articles | ||
There are #445 articles | ||
|
||
--- | ||
- ## Categories | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Guile | ||
|
||
[Back](../languages.md) | ||
|
||
- [Guile Assoc List](./guile_assoc_list.md) | ||
- [Guile CLI Application](./guile_cli_app.md) | ||
- [Guile Macros](./guile_macros.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- | ||
- ```scm | ||
(define object-locations '( | ||
(whiskey-bottle . living-room) | ||
(bucket . living-room) | ||
(chain . garden) | ||
(frog . garden) | ||
(test . player) | ||
)) | ||
``` | ||
- > Note: Associative list created using quote are immutable | ||
- ## Modifying assoc-lists | ||
- ```scm | ||
(assoc-set! object-location* object 'player) | ||
``` | ||
- | ||
- ## Reading | ||
- https://www.gnu.org/software/guile/manual/html_node/Association-Lists.html | ||
logseq.order-list-type:: number | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- ```scm | ||
#!/usr/bin/env guile -s | ||
!# | ||
(use-modules (ice-9 regex)) | ||
(use-modules (ice-9 format)) | ||
(define (main) | ||
(let ((args (program-arguments))) | ||
(if (< (length args) 2) | ||
(begin (display (format #f "Usage: ~s [args]\n" (car args))) | ||
(newline) | ||
(exit))))) | ||
; Call the main function | ||
(main) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Guile Macros | ||
- | ||
- ## Examples | ||
- **A simple expansion** | ||
- ```scm | ||
; Macro | ||
; Usage (walk west) | ||
; Expanded to (walk-direction west) | ||
(define-syntax walk | ||
(syntax-rules () | ||
((walk direction) | ||
(walk-direction 'direction)))) | ||
``` | ||
- **A more complex expansion that create a new procedure** | ||
- ```scm | ||
(define-syntax game-action | ||
(syntax-rules () | ||
((game-action command subj obj place ...) | ||
(define command (lambda (subject object) | ||
(cond ((and (eq? *location* 'place) | ||
(eq? 'subject 'subj) | ||
(eq? 'object 'obj) | ||
(have 'subj)) | ||
...) | ||
(#t '(i cant command like that.)))))))) | ||
(game-action weld chain bucket attic | ||
(cond ((and (have 'bucket) (set! *chain-welded* #t)) | ||
'(the chain is now securely welded to the bucket.)) | ||
(#t '(you do not have a bucket.)))) | ||
(game-action dunk bucket well garden | ||
(cond (*chain-welded (set! *bucket-filled* #t) '(the bucket is full of water.) | ||
(#t '(the water level is too low to reach.))))) | ||
; Creates two new actions into the game | ||
``` | ||
- ## Further Reading | ||
- https://www.gnu.org/software/guile/manual/html_node/Macros.html | ||
logseq.order-list-type:: number | ||
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Tensor Networks | ||
|
||
[Back](../../index.md) | ||
|
||
Tensor Networks (Penrose diagrams) are visual diagrams to represent Tensor operations. The idea behind using a visual representations is that you can study and optimize these networks. These networks are also perhaps with some minor differences, **string diagrams. **String diagrams have been used in category theory to prove things (Curry Howard correspondence). Also formal proofs can be used to generalize optimizations | ||
**(Linear Algebra/Differential Equations) - Tensors - Category Theory - Formal Proofs - Optimizations** | ||
|
||
## Reading | ||
|
||
- https://www.microsoft.com/en-us/research/publication/using-tensor-diagrams-to-represent-and-solve-geometric-problems/?from=https://research.microsoft.com/apps/pubs/default.aspx?id=79791&type=exact | ||
- https://en.wikipedia.org/wiki/Tensor_network | ||
- https://www.math3ma.com/blog/matrices-as-tensor-network-diagrams | ||
- https://www.tensors.net/tutorial-4 | ||
|
||
## Papers | ||
|
||
- Fong, Brendan and David I. Spivak. “Seven Sketches in Compositionality: An Invitation to Applied Category Theory.” *arXiv: Category Theory* (2018): n. pag. | ||
- Bradley, Tai-Danae. “What is Applied Category Theory?” (2018). | ||
- https://iopscience.iop.org/article/10.1088/1751-8121/aa6dc3 | ||
- https://www.mathstat.dal.ca/~selinger/papers.html#graphical | ||
- Selinger, Peter. “A Survey of Graphical Languages for Monoidal Categories.” *arXiv: Category Theory* (2009): 289-355. | ||
- https://www.cs.ox.ac.uk/people/bob.coecke/Selby.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters