Skip to content

Commit 3e011ca

Browse files
committed
updates make,gnuplot,sqlite,raytracing
1 parent 9302599 commit 3e011ca

File tree

6 files changed

+76
-49
lines changed

6 files changed

+76
-49
lines changed

editor/debugging/gdb.org

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
| set | $1 = 4 | sets a gdb variable |
7272
| set | args 1 2 3 | sets "run" arguments |
7373
| set | var x=15 | sets a program variable |
74+
| set | x = 15 | |
7475
| set | pagination off | |
7576
| (i)nfo | registers | |
7677
| x/i | $pc | |
@@ -126,6 +127,7 @@
126127

127128
- can include a variable name
128129
- can reference previous results with "$N"
130+
- can include multiple vars, if they are the same size, surrounded by {a,b}
129131

130132
*** e(x)amine
131133

editor/debugging/valgrind.org

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* gotchas
2+
3+
- works only gcc (?

gamedev/graphics/raytracing.org

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ https://www.youtube.com/watch?v=NIAUFnNZGhE
196196
#+end_src
197197
* Book: The Ray Tracer Challenge
198198

199+
199200
- Bonus Chapters http://www.raytracerchallenge.com/#bonus
200201
- Errata https://pragprog.com/cms/errata/jbtracer-errata/
201202
- Cofactor 4x4
@@ -217,6 +218,20 @@ https://www.youtube.com/watch?v=NIAUFnNZGhE
217218
- usage of _init() for structs
218219
- unions for vec3
219220

221+
** 0 Article
222+
https://medium.com/@jogrosso/the-ray-tracer-challenge-learning-c-through-computer-graphics-e45a68fb7cd5
223+
- source C++ https://github.com/joseph-grosso/ray-tracer-challenge
224+
- perlin C++ https://raw.githubusercontent.com/Reputeless/PerlinNoise/refs/heads/master/PerlinNoise.hpp
225+
- OpenMP for threads
226+
- Matrix https://eigen.tuxfamily.org/index.php?title=Main_Page
227+
- perf
228+
#+begin_src sh
229+
sudo perf record -F 999 -a -g -- ./build/challenges/challenge.out && \
230+
sudo perf script > out.perf && \
231+
../FlameGraph/stackcollapse-perf.pl out.perf > out.folded && \
232+
../FlameGraph/flamegraph.pl out.folded > kernel.svg && \
233+
google-chrome ./kernel.svg
234+
#+end_src
220235
** 1 Tuples
221236

222237
*** Types

languages/compiled/makefile/self.org

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -202,24 +202,24 @@ https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
202202

203203
*** strings
204204
https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
205-
|------------+---------------+-------------------------------------------|
206-
| <c> | <c> | |
207-
| | | returns |
208-
|------------+---------------+-------------------------------------------|
209-
| word | n,text | text[n] |
210-
| wordlist | n,m,text | text[n:m] |
211-
| firstword | text | text[0] |
212-
| lastword | text | text[-1] |
213-
| words | text | len(text) |
214-
|------------+---------------+-------------------------------------------|
215-
| findstring | needle,text | "needle" or "" if not in text |
216-
| filter | pat%...,text | remove words that match "pat%" |
217-
| filter-out | pat%...,text | remove words that do NOT match "pat%" |
218-
| sort | text | sort words, remove dups |
219-
| strip | text | trim and squash whitespaces |
220-
| subst | from,to,text | substitute literal words |
221-
| patsubst | pat,repl,text | substitute pattern% words, text can use * |
222-
|------------+---------------+-------------------------------------------|
205+
|------------+---------------+---------------------------------------|
206+
| <c> | <c> | |
207+
| | | returns |
208+
|------------+---------------+---------------------------------------|
209+
| word | n,text | text[n] |
210+
| wordlist | n,m,text | text[n:m] |
211+
| firstword | text | text[0] |
212+
| lastword | text | text[-1] |
213+
| words | text | len(text) |
214+
|------------+---------------+---------------------------------------|
215+
| findstring | needle,text | find |
216+
| filter | pat%...,text | remove |
217+
| filter-out | pat%...,text | remove-if-not |
218+
| sort | text | sort+dedup |
219+
| strip | text | trim and squash whitespaces |
220+
| subst | from,to,text | literal substitution |
221+
| patsubst | pat,repl,text | pattern% substitution, text can use * |
222+
|------------+---------------+---------------------------------------|
223223
*** filenames
224224
https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html
225225
|-----------+---------------+-------------------------------------------------|

languages/sql/sqlite/self.org

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@
3030
* cli
3131

3232
- https://www.sqlite.org/cli.html (TODO 6)
33-
- $ sqlite3 :memory: # or just not pass any argument
33+
34+
#+begin_src sh
35+
$ sqlite3 :memory: # or just not pass any argument
36+
$ sqlite3 foo.db 'SELECT * FROM events'
37+
$ sqlite3 foo.db .dump
38+
#+end_src
3439

3540
** metacomands
3641
|------------+-------------------+---------------------------------------------------|
@@ -253,6 +258,8 @@ https://www.sqlite.org/lang_aggfunc.html
253258
| group_concat | x[,sep] | "," is used if sep(arator) is ommited |
254259
| string_agg | x ,sep | alias of group_concat(x,sep) |
255260
|--------------+---------+-------------------------------------------------------|
261+
*** Window
262+
https://sqlite.org/windowfunctions.html
256263
** Foreign Keys
257264
https://www.sqlite.org/foreignkeys.html
258265

terminal/tools/visualization/gnuplot/self.org

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,36 @@
4444
|-------+------------------------------------|
4545
** options (setteable)
4646
#+CAPTION: S = a quoted string, N = a number
47-
|------------+-------------------+----------------------------------|
48-
| <c> | <c> | |
49-
| | argument | description |
50-
|------------+-------------------+----------------------------------|
51-
| border | [N] | axis lines |
52-
| [x¦y]tics | [nomirror¦rotate] | axis numbers |
53-
| [x¦y]label | S | axis label |
54-
| [x¦y]range | [N:N] | axis range |
55-
| grid | - | axis grid |
56-
| key | [LR] [[no]box] | the box with key labels |
57-
|------------+-------------------+----------------------------------|
58-
| samples | N | ???? |
59-
| xdata | time | tells x axis is a date/time |
60-
| encoding | utf8 | |
61-
| timefmt | S | format of the INPUT date |
62-
| datafile | separator S | input separator (default: space) |
63-
|------------+-------------------+----------------------------------|
64-
| title | S | the |
65-
| format | [x¦y] FMT | tic format string |
66-
| logscale | [x¦y] [N] | with step N |
67-
| autoscale | [[x¦y]fix] | prevents autoextend of scale |
68-
| output | S | saves into filepath at S |
69-
| style | fill transparent | |
70-
| | solid F | |
71-
| | noborder | |
72-
| | data lines | |
73-
|------------+-------------------+----------------------------------|
74-
| pause | N | seconds to pause |
75-
| +reread+ | - | REMOVED in 6.0 +reread input+ |
76-
|------------+-------------------+----------------------------------|
47+
|--------------+-------------------+----------------------------------|
48+
| <c> | <c> | |
49+
| | argument | description |
50+
|--------------+-------------------+----------------------------------|
51+
| border | [N] | axis lines |
52+
| [x¦y¦z]tics | [nomirror¦rotate] | axis numbers |
53+
| [x¦y¦z]label | S | axis label |
54+
| [x¦y¦z]range | [N:N] | axis range |
55+
| grid | - | axis grid |
56+
| key | [LR] [[no]box] | the box with key labels |
57+
|--------------+-------------------+----------------------------------|
58+
| samples | N | ???? |
59+
| xdata | time | tells x axis is a date/time |
60+
| encoding | utf8 | |
61+
| timefmt | S | format of the INPUT date |
62+
| datafile | separator S | input separator (default: space) |
63+
|--------------+-------------------+----------------------------------|
64+
| title | S | the |
65+
| format | [x¦y] FMT | tic format string |
66+
| logscale | [x¦y] [N] | with step N |
67+
| autoscale | [[x¦y]fix] | prevents autoextend of scale |
68+
| output | S | saves into filepath at S |
69+
| style | fill transparent | |
70+
| | solid F | |
71+
| | noborder | |
72+
| | data lines | |
73+
|--------------+-------------------+----------------------------------|
74+
| pause | N | seconds to pause |
75+
| +reread+ | - | REMOVED in 6.0 +reread input+ |
76+
|--------------+-------------------+----------------------------------|
7777
** plot
7878
- plot
7979
- /dev/stdin

0 commit comments

Comments
 (0)