Skip to content

Commit e25d922

Browse files
committed
updates
1 parent 4e9d3d8 commit e25d922

File tree

8 files changed

+46
-19
lines changed

8 files changed

+46
-19
lines changed

languages/c/makefile/self.org

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,24 @@ help: # https://lobste.rs/s/7svvkz/using_bsd_make#c_mar0yk
247247
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
248248
#+end_src
249249

250+
- run N targets concurrently with *--jobs=N*
251+
#+begin_src makefile
252+
.PHONY: dev dev/dep1 dev/dep2
253+
dev:; $(MAKE) -j2 dev/dep1 dev/dep2
254+
dev/dep1: sleep 10
255+
dev/dep2: sleep 60
256+
#+end_src
257+
258+
- dynamically set a variable at runtime (aka inside a target)
259+
#+begin_src makefile
260+
task1:
261+
$(eval ROBOTS = $(shell curl example.com/robots.txt))
262+
@echo $(ROBOTS)
263+
#+end_src
264+
250265
- set bash pipefail, use either of these
251266
#+begin_src makefile
252-
SHELL = /bin/bash -o pipefail
267+
SHELL = /bin/bash -o pipefail
253268
.SHELLFLAGS = -eu -o pipefail -c
254269
#+end_src
255270

languages/lisp/clojure/articles.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- android https://gist.github.com/jamesnyika/ab58fe4d75481d5119312d050664c681
12
- comic https://daiyi.co/blog/clojure-comic/
23
- Simulating Machines in Clojure https://stopa.io/post/255
34
- 15 https://stevelosh.com/blog/2015/12/ludum-dare-34/

languages/lisp/common-lisp/books.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- Graham Book notes https://courses.cs.northwestern.edu/325/readings/graham/graham-notes.html
12
- https://github.com/mark-watson/loving-common-lisp
23
- https://leanpub.com/lovinglisp/read
34
- https://leanpub.com/readevalprintlove001/read

languages/ml/haskell/articles.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- https://marcosampellegrini.com/thoughts-on-haskell-2020
12
- https://speakerdeck.com/ajnsit/supercharged-imperative-programming-with-haskell-and-fp
23
- https://entropicthoughts.com/haskell-procedural-programming
34
- https://learnxinyminutes.com/haskell/

languages/ml/haskell/books.org

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
- https://lokathor.gitbooks.io/using-haskell/content/
1313
- https://lotz84.github.io/haskellbyexample/
1414
- https://leanpub.com/simple-haskell-book/read - build a CI
15-
official source https://github.com/alpacaaa/quad-ci
16-
unofficial source https://github.com/jturner/quad-ci
15+
- official source https://github.com/alpacaaa/quad-ci
16+
- unofficial source https://github.com/jturner/quad-ci
17+
- video leanpub https://www.youtube.com/watch?v=LlQ8-ajfcTY
18+
- video simple https://www.youtube.com/watch?v=4Wpuo68ZUMg
1719
- https://leanpub.com/production-haskell/read
1820
- https://leanpub.com/haskell-cookbook/read
1921
- https://leanpub.com/haskell-stdlibs

languages/ml/haskell/videos.org

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- 19 Stick to Simple Haskell https://www.youtube.com/watch?v=zHSD7qC_4iI
2+
- 22 "HTML over the wire" meets functional https://www.youtube.com/watch?v=ZoTpOQr2vuk
13
- Livestreams Learning Haskell https://www.youtube.com/@JohnCinnamond/streams
24
- Haskell Adventures - A Calculator
35
https://www.youtube.com/playlist?list=PL_xuff3BkASMOzBr0hKVKLuSnU4UIinKx

terminal/shells/bash/self.org

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,15 @@ done | sort -R | xargs -ILETTER echo -n LETTER
414414
#+end_src
415415

416416
* Gotchas
417-
- for i in *.baz
418-
- if no .baz in dir it will run on *.baz
419-
- zsh: errors
420-
- fish: does nothing
421-
- some language constructs spawn *subshells* (eg: pipelining)
422-
- piped commands run/start all at the same time
423-
- if one fails the rest will ran regardless if "pipefail" is set
417+
418+
1) for i in *.baz
419+
- if no .baz in dir it will run on the literal "*.baz"
420+
- zsh: errors
421+
- fish: does nothing
422+
2) some language constructs spawn *subshells* (eg: pipelining)
423+
3) | pipe
424+
- all piped commands run/start at the same time
425+
- if one fails the rest will ran regardless if "pipefail" is set
426+
4) set -e
427+
- aka errexit
428+
- does NOT have any effect inside functions (?

terminal/shells/sh.org

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@
7171
until ssh [email protected]; do sleep 3; done
7272
#+end_src
7373

74-
|-----------+---------------+-----------|
75-
| | <c> | <c> |
76-
| | lines | aka |
77-
|-----------+---------------+-----------|
78-
| head -n 5 | first 5 | take |
79-
| tail -n+5 | skips first 4 | drop |
80-
| tail -n 5 | last 5 | take-last |
81-
| head -n-5 | skips last 5 | drop-last |
82-
|-----------+---------------+-----------|
74+
|-----------+-----------+---------------|
75+
| <c> | <c> | <l> |
76+
| | cmd | lines |
77+
|-----------+-----------+---------------|
78+
| take | head -n 5 | first 5 |
79+
| drop | tail -n+5 | skips first 4 |
80+
| take-last | tail -n 5 | last 5 |
81+
| drop-last | head -n-5 | skips last 5 |
82+
|-----------+-----------+---------------|

0 commit comments

Comments
 (0)