Wisp Leistung
Binary file .emacs.d/elpa/gnupg/pubring.kbx has changed
Binary file .emacs.d/elpa/gnupg/trustdb.gpg has changed
sitemap.org: site/.published
site/.published: index.org external-rss.org $(arnebab_DATA) setup.el .emacs.d/init.el ## create and publish the site according to setup.el
rsync -ruv assets/ site/assets
- echo -e Yes\\nYes > $$(tty) ; Xvfb :3 -screen 0 1024x768x16 & time DISPLAYY=:3 GUILE_QUIET=1 HOME="$(realpath @abs_top_builddir@)" timeout 300 emacs --load .emacs.d/init.el --load setup.el "$<" --eval "(setq org-babel-ditaa-java-cmd \"LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$$HOME/.guix-profile/lib/ java\" plantuml-executable-path \"plantuml\" org-plantuml-jar-path \"$${GUIX_ENVIRONMENT=/home/$(whoami)/.guix-profile}/share/java/plantuml.jar\" org-plantuml-exec-mode 'plantuml)" --eval '(org-publish-current-project "arnebab-org")' -f kill-emacs && touch "$@" < $$(tty) > build.log || time DISPLAYY=:3 GUILE_QUIET=1 HOME="$(realpath @abs_top_builddir@)" timeout 1800 emacs --load .emacs.d/init.el --load setup.el "$<" --eval "(setq org-babel-ditaa-java-cmd \"LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$$HOME/.guix-profile/lib/ java\" plantuml-executable-path \"plantuml\" org-plantuml-jar-path \"$${GUIX_ENVIRONMENT=/home/$(whoami)/.guix-profile}/share/java/plantuml.jar\" org-plantuml-exec-mode 'plantuml)" --eval '(org-publish-current-project "arnebab-org")' -f kill-emacs && touch "$@" < $$(tty) > build.log && rm -f site/*~ site/*/*~ site/*/*/*~ site/*/*/*/*~ && rm -rf site/.emacs.d/
+ echo -e Yes\\nYes > $$(tty) ; Xvfb :3 -screen 0 1024x768x16 & time DISPLAYY=:3 GUILE_INHIBIT_WELCOME_MESSAGE=1 GUILE_QUIET=1 HOME="$(realpath @abs_top_builddir@)" timeout 300 emacs --load .emacs.d/init.el --load setup.el "$<" --eval "(setq org-babel-ditaa-java-cmd \"LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$$HOME/.guix-profile/lib/ java\" plantuml-executable-path \"plantuml\" org-plantuml-jar-path \"$${GUIX_ENVIRONMENT=/home/$(whoami)/.guix-profile}/share/java/plantuml.jar\" org-plantuml-exec-mode 'plantuml)" --eval '(org-publish-current-project "arnebab-org")' -f kill-emacs && touch "$@" < $$(tty) > build.log || time DISPLAYY=:3 GUILE_INHIBIT_WELCOME_MESSAGE=1 GUILE_QUIET=1 HOME="$(realpath @abs_top_builddir@)" timeout 1800 emacs --load .emacs.d/init.el --load setup.el "$<" --eval "(setq org-babel-ditaa-java-cmd \"LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$$HOME/.guix-profile/lib/ java\" plantuml-executable-path \"plantuml\" org-plantuml-jar-path \"$${GUIX_ENVIRONMENT=/home/$(whoami)/.guix-profile}/share/java/plantuml.jar\" org-plantuml-exec-mode 'plantuml)" --eval '(org-publish-current-project "arnebab-org")' -f kill-emacs && touch "$@" < $$(tty) > build.log && rm -f site/*~ site/*/*~ site/*/*/*~ site/*/*/*/*~ && rm -rf site/.emacs.d/
$(minified_assets) : assets/.minified
assets/.minified : $(wildcard assets/*png) assets/shrink.sh
Binary file anderes/team-starter-structure.png has changed
software/programming-scheme-hoot.png:software/programming-scheme-hoot.png
software/programming-scheme-packaged.png:software/programming-scheme-packaged.png
software/programming-scheme-trees.png:software/programming-scheme-trees.png
+ software/programming-scheme-tree.png:software/programming-scheme-tree.png
software/programming-scheme-profile.png:software/programming-scheme-profile.png
software/programming-scheme-book.png:software/programming-scheme-book.png])
:FEEDSTATUS:
-(("https://rollenspiel.social/@ArneBab/115410829925205552" t
- "ee0d6519697315cea36d09830dcf659ba22e6b7b")
- ("https://rollenspiel.social/@ArneBab/115411343423160721" t
- "bdc48658daafa5f7021c230521706d3638323532")
- ("https://rollenspiel.social/@ArneBab/115412648213775511" t
+(("https://rollenspiel.social/@ArneBab/115412648213775511" t
"378be577bc0c88738fe4ca41a63f423a65a66234")
("https://rollenspiel.social/@ArneBab/115413067582282542" t
"76660442cf0967dd0db841b460f64ae8fafa7d92")
("https://rollenspiel.social/@ArneBab/115448798510186065" t
"5437c8f1d0d738c60082b177590b0345fbcb2bcb")
("https://rollenspiel.social/@ArneBab/115452604039239302" t
- "b3ce8681329d2d22ebe7ecda9c1f2d326ff7bbe4"))
+ "b3ce8681329d2d22ebe7ecda9c1f2d326ff7bbe4")
+ ("https://rollenspiel.social/@ArneBab/115454072144761882" t
+ "76d1eeb6ebab0fbc2130f60a91672f5ddc0a3e80")
+ ("https://rollenspiel.social/@ArneBab/115454315071224788" t
+ "6d1275813a2a711b4cc1e66ff42f4c174702a0de"))
:END:
+** [2025-10-28 Di 23:10]
+ There’s no shame in being wrong and changing your mind.
+
+
+You cannot be right on topics that are too complex for kids without
+having been wrong a lot, realizing it, and changing your mind in
+response.
+
+ [[https://rollenspiel.social/@ArneBab/115454315071224788]]
+
+
+** [2025-10-28 Di 22:08]
+ Tanz mit der Schlange: Nass
+
+https://www.draketo.de/rollenspiel/schlange#nass
+
+
+Unsere #Earthdawn-Runde geht weiter.
+
+
+Nachdem wir in der letzten Runde im Fluss abgetrieben wurden, haben
+wir jetzt einen Weg gefunden, die Lahala zu retten. Oder zumindest in
+ihre Nähe zu kommen.
+
+
+Wir haben viel mehr gelacht als sonst, einen Ara gerettet, einen
+geheimen Gang unter Wasser gefunden und ein Krokodil abgehängt.
+
+
+Und sehr, sehr viele 2-er und 3-er gewürfelt.
+
+
+Das Bild ist aus der vorigen Runde.
+
+
+#pnpde ink sketch
+
+ [[https://rollenspiel.social/@ArneBab/115454072144761882]]
+
+
** [2025-10-28 Di 15:55]
"Warum du sogar echten Fotos nicht mehr glauben kannst"
[[https://rollenspiel.social/@ArneBab/115412648213775511]]
-** [2025-10-21 Di 09:02]
- Diego created Whisper: a faithful port of #Wisp to #CommonLisp!
-
-
-https://git.sr.ht/~dieggsy/whisper
-
-
-⇒ https://www.draketo.de/software/wisp#whisper-common-wisp
-
-
-#FreeSoftware lisp programming
-
- [[https://rollenspiel.social/@ArneBab/115411343423160721]]
-
-
-** [2025-10-21 Di 06:51]
- The road to a life in #Emacs is paved by little conveniences.
-
-
-Example:
-
-
-“When I set this up in Emacs, I can just link to it from my notes and
-TODOs via org-store-link and org-insert-link, so I get to it with a
-single click when I need to change something.”
-
-
-#gnu
-
- [[https://rollenspiel.social/@ArneBab/115410829925205552]]
-
-
* Gute Neuigkeiten
#+latex: \clearpage
+* Der Blinde Fleck der Leistungsmedien: Disziplin ist nicht nur eine Frage des Wollens, und wollen …
+ :PROPERTIES:
+ :CUSTOM_ID: blinder-fleck-leistungmedien
+ :ID: 2ad80d5e-1ce4-4c8a-a0b6-2c1fffab4977
+ :PUBDATE: 2025-10-29 Mi 02:25
+ :END:
+
+/Kommentar zu [[https://www.youtube.com/watch?v=IKrhcZmuarY][Die dunkle Seite von Ozempic]] vom Parabelritter./
+
+„Und die Ernährung hängt … mit Disziplin zusammen“ - und Disziplin
+lernst du mit Lootboxen … Magic Karten … … …
+
+So einfach ist die Psyche leider nicht.
+
+Und Leuten, die 70 Stunden arbeiten (viele Selbstständige, Youtuber,
+…) fällt es oft sehr schwer, das zu verstehen: ein blinder Fleck, weil
+wer etwas erlebt hat, das dieses Verständnis bringt, den Job zumindest
+in der Zeit nicht machen konnte und dadurch oft ganz raus ist.
+
+Lass dir nie von Leuten vorschreiben, wie viel du zu leisten hast,
+die noch keinen Burnout hatten.
+
+#+begin_kasten
+Disziplin ist nicht nur eine Frage des Wollens, und etwas zu wollen
+ist ein Wert, den Viele erst erkennen, wenn er ihnen abhanden kommt.
+#+end_kasten
+
+Ein Freund von mir hatte Burnout. Er hat mir letztens gesagt, dass er
+kurz nach dem Burnout nicht glaubte, je wieder arbeiten zu können.
+Durch Unterstützung des Arbeitgebers und der Familie arbeitet er
+inzwischen wieder 32 Stunden die Woche. Sogar im gleichen Job. Es hat
+aber mehrere Jahre gedauert, wieder auf den Damm zu kommen.
+
+Und dass da der Arbeitgeber helfen muss, damit das klappen kann, ist
+ein Unding. Ich glaube es liegt mit daran, dass Verständnis fehlt.
+
+Ein Arzt sagte z.B. vor einem halben Jahr aus dem nichts zu mir, er
+glaube nicht an Burnout …
+
+/Und nein: Abnehmspritzen sind dafür keine Lösung./
+
+[2025-10-28 Di]
+
* The EU might make in-game transations *no longer* harmful
:PROPERTIES:
:CUSTOM_ID: eu-ingame-transactions-no-longer-harmful
- Q: Kennst du da einen Zugang?
- T: Wenn mich das jemand anders fragen würde, würde ich nein sagen.
-Quendan macht Frühstück, dann sprechen wir beim Essen weiter. *Drana*
-fehlt gerade.
+Quendan macht Frühstück. *Drana* fehlt gerade.
Nach dem wunderbaren Frühstück erzählt Tel’Dain weiter.
- Tel’Dain: Ihr habt gefragt, ob es eine Möglichkeit gibt, unentdeckt
- in den Turm zu gelangen. Die gibt es tatsächlich. Um Boden des
+ in den Turm zu gelangen. Die gibt es tatsächlich. Im Boden des
Turmes ist ein unter Wasser liegender Tunnel, der in einen Lagerraum
im Turm führt.
- Quendan: Kannst du uns eine Karte zeichnen, wie man von dort zu den
rauscht durch das Wasser und schnappt kurz vor mir zusammen. Dann
drehe ich mich um und schieße durch das Wasser davon zum Ufer.
-# 40: 4x6 nachwürfeln und 1x8 nachwürfeln.
+/Ich habe für zweifaches Ausweichen und die Flucht 10, 20 und 40
+ gewürfelt; 40 war 4x6 nachwürfeln und 1x8 nachwürfeln./
+ /Vorher waren fast alle Würfe 2 oder 3./
Wir kennen jetzt den Weg, um die *Lahala Daikara* zu retten.
-
* Anhang
:PROPERTIES:
:CUSTOM_ID: anhang
\vfill
\begin{center}
\fbox{\begin{minipage}{30em}
-Text, Design, and Publishing: Arne Babenhauserheide,\\\phantom{Text, Design, and Publishing: }Karlsruher Str. 85,\\\phantom{Text, Design, and Publishing: }76676 Graben-Neudorf\\\phantom{Text, Design, and Publishing: }\textt{arne\_bab@web.de}
+Text, Design, and Publishing: Arne Babenhauserheide,\\\phantom{Text, Design, and Publishing: }Karlsruher Str. 85,\\\phantom{Text, Design, and Publishing: }76676 Graben-Neudorf\\\phantom{Text, Design, and Publishing: }\texttt{arne\_bab@web.de}
License: Creative Commons: \href{https://creativecommons.org/licenses/by-sa/4.0/}{Attribution - Sharealike}.\\\phantom{License: }Code examples also under any Free Software license.
Production: epubli – ein Service der neopubli GmbH,\\\phantom{Production: }Köpenicker Straße 154a, 10997 Berlin
-Contact according to EU product safety regulation:\\\phantom{Production: }\textt{produktsicherheit@epubli.com}
+Contact according to EU product safety regulation:\\\phantom{Production: }\texttt{produktsicherheit@epubli.com}
\end{minipage}}
\end{center}
#+end_export
else ;; else is #true in cond
. #f
cond
- #f #f ;; can put the value directly
+ #f #f ;; can put the value directly
else #t ;; on the same line, if not using :
#+end_src
#+begin_src wisp :results output :exports both
define more-precise-height 5.32517
-define 100-meters 1e2
+define 100-meters 1e2 ;; 1 times 10 to the power of 2
. more-precise-height
. 100-meters
#+end_src
These are floating point numbers. They store approximate values in 64
-bit binary, depending on the platform. Read all the details in the
-Guile Reference manual [[https://www.gnu.org/software/guile/manual/html_node/Reals-and-Rationals.html][Real and Rational Numbers]], the [[https://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs-html/r5rs_8.html#SEC50][r5rs numbers]],
+bit binary, depending on the platform. Read the details in the
+Guile Reference manual section [[https://www.gnu.org/software/guile/manual/html_node/Reals-and-Rationals.html][Real and Rational Numbers]], the [[https://groups.csail.mit.edu/mac/ftpdir/scheme-reports/r5rs-html/r5rs_8.html#SEC50][r5rs numbers]],
and [[https://ieeexplore.ieee.org/document/8766229][IEEE 754]].@@latex:\footnote{All links are listed on page \pageref{listoflinks}.}@@
#+html: <p class="back-to-map"><em><a href="#map-of-scheme">🗺 back to the map</a></em></p>
#+begin_src wisp :results output :exports both
exact->inexact #e0.2
exact->inexact 1/5
-exact->inexact 2e7
+exact->inexact -2e7
#+end_src
The inverse is =inexact->exact=:
#+begin_src wisp :results output :exports both :wrap SRC compilation
define 100 ;; error!
- * 10 10
+ + 90 10
#+end_src
#+attr_html: :style font-size:x-small;
. half-hundred
#+end_src
+#+html: <img src="programming-scheme-tree.png" style="width: 100%; max-width: 100%;" />
+#+latex: \ThisLRCornerWallPaper{0.38}{programming-scheme-tree}%
+
#+latex: \clearpage
#+html: <p class="back-to-map"><em><a href="#map-of-scheme">🗺 back to the map</a></em></p>
* Return a list of values with =list=
. known-heights
#+end_src
-You can put values on their own lines by returning their value: =.=
-returns all the values in its line. Different from =define :=, list keeps
-all values, not just the last.
+You can put values on their own lines by returning their value:\\
+=.= returns all the values in its line. Different from =define :=,
+list keeps all values, not just the last.
#+begin_src wisp :noweb-ref known-heights2 :results output :exports both
define known-heights-2
define : last-height
. 3 3.75 5 100 ;; only the last (100) is returned
= 100 : last-height
+. known-heights-3
#+end_src
#+latex: \clearpage
SRFI’s are Scheme Requests For Implementation, portable libraries
built in collaboration between different Scheme implementations. The
-ones available in Guile can be found [[https://www.gnu.org/software/guile/manual/html_node/SRFI-Support.html][in the Guile reference manual]].
-More can be found on [[https://srfi.schemers.org/][srfi.schemers.org]]. They are imported by number
-(=:1=) and can have a third component with a name, but that’s not
-required.
+ones available in Guile can be found in the SRFI chapter of the
+[[https://www.gnu.org/software/guile/manual/html_node/SRFI-Support.html][Guile Reference Manual]]. More can be found on [[https://srfi.schemers.org/][srfi.schemers.org]]. They are
+imported by number (=:1=) and can have a third component with a name,
+but that’s not required.
You can use =only= to import only specific names.
:CUSTOM_ID: profile
:END:
-When in the interactive REPL, you can get a runtime profile; for fast
-operations you may need to run them in a loop to get a robust sample:
+When in the interactive REPL, you can get a runtime profile. Fast
+operations may need to be run in a loop to get a robust sample:
#+latex: \ThisLRCornerWallPaper{0.40}{programming-scheme-profile}%
#+end_example
To look deeper, use =,disassemble=.\\
-In code files =import statprof=.
+In code files =import : statprof=.
+
#+latex: \clearpage
+#+html: <img src="programming-scheme-profile.png" style="width: 100%; max-width: 100%;" />
#+html: <p class="back-to-map"><em><a href="#map-of-scheme">🗺 back to the map</a></em></p>
* Get the result of logic inline with parentheses =()=, braces ={}=, or colon =:=
:PROPERTIES:
:END:
#+begin_src wisp :results output :exports both
-import : srfi :26 cut
list 1 2 (+ 1 2) 4
list 1 2 {1 + 2} 4
list 1 2 : + 1 2
. 4 ;; use . to continue the arguments after :
-map (cut + 3 <>) : list 1 2 3
#+end_src
Line breaks and indentation are ignored inside parentheses, except for
=.= needs linebreaks, because it only applies at the beginning of the
line (after indentation).
-=cut= is logic that has logic as result.
+#+latex: \vfill
+#+begin_export latex
+\begin{tikzpicture}[overlay]
+ \node[starburst, draw, fill=red]
+ at (12.1,-0.14) {\small \fontseries{b}\selectfont \raggedleft \textcolor{white}{\contour{white}{Zen for Scheme}~}\hspace*{0.11\linewidth}};
+\end{tikzpicture}
+#+end_export
+#+begin_kasten
+*A Zen for Scheme part 2: On the Ground*
+@@latex:\vspace{1em}@@
+
+- *HA* :: Hygiene reduces Anxiety,\\
+ /except where it blocks your path./
+- *PP* :: Practicality beats Purity,\\
+ /except where it leads into a dead end./
+- *3P* :: 3 Pillars of improvement:\\
+ Experimentation, Implementation, Standardization.
+#+end_kasten
#+latex: \clearpage
Like ~=~ and =+=, =equal?= can be used on arbitrary numbers of values.
-#+latex: \vfill
-#+begin_export latex
-\begin{tikzpicture}[overlay]
- \node[starburst, draw, fill=red]
- at (12.1,-0.14) {\small \fontseries{b}\selectfont \raggedleft \textcolor{white}{\contour{white}{Zen for Scheme}~}\hspace*{0.11\linewidth}};
-\end{tikzpicture}
-#+end_export
-#+begin_kasten
-*A Zen for Scheme part 2: On the Ground*
-@@latex:\vspace{1em}@@
-
-- *HA* :: Hygiene reduces Anxiety,\\
- /except where it blocks your path./
-- *PP* :: Practicality beats Purity,\\
- /except where it leads into a dead end./
-- *3P* :: 3 Pillars of improvement:\\
- Experimentation, Implementation, Standardization.
-#+end_kasten
-
#+latex: \clearpage
#+html: <p class="back-to-map"><em><a href="#map-of-scheme">🗺 back to the map</a></em></p>
define a 1
define b 1
apply = a b
- list 1 1
+ list 1 1 ;; the same as = 1 1 1 1
#+end_src
Using =apply proc a (list b c)= has the same result as calling proc
same? 1 1 1 1 ;; 4 arguments, the last 2 are rest
#+end_src
-Remember that apply uses only the last of its arguments as list, in
+Remember that =apply= uses only the last of its arguments as list, in
symmetry with =. rest=.
#+latex: \clearpage
APIs than iteration, because fewer names are visible from outside.
As rule of thumb: start with the recursion end condition (here:
-=(null? heights)= and ensure that each branch of the =cond= either
+=(null? heights)=) and ensure that each branch of the =cond= either
ends recursion by returning something (here =#f= or =#t=) or moves a
step towards finishing (usually with =cdr=, =+=, =-=, =1+=, or =1-=).
-/Another example why [[http://www.draketo.de/light/english/recursion-wins][recursion wins]]:/
+/Another example in which [[http://www.draketo.de/light/english/recursion-wins][recursion wins]]:/
#+begin_src wisp :results output
define : fib n
/The core of composing elementwise operations./
-To build your own =map= function which returns a list of results, you
-need to add to a list. =cons= adds to the front:
+To build your own =map= function, you need to add to a list. =cons= on
+a list adds to the front (=cons= on other values creates a =pair=).
#+begin_src wisp :results output :exports both
-cons 1 : list 2 3
-;; => list 1 2 3
+cons 1 : list 2 3 ;; => list 1 2 3
+cons 1 2 ;; => (1 . 2) - also see pair? and assoc
#+end_src
Used for a simplified =map= implementation that takes a single list:
let loop : (changed (list)) (elements elements)
cond
: null? elements
- reverse changed
+ reverse changed ;; restore the order
else
loop
;; add processed first element to changed
- cons : proc : first elements
- . changed
- ;; drop first element from elements
- cdr elements
+ cons : proc : first elements ;; add processed
+ . changed ;; to changed
+ cdr elements ;; drop first element from elements
single-map even? : list 1 2 3
#+end_src
list 1 2 3
. code
;; => (list 1 2 3)
-;; uses parentheses form
+;; uses a form with parentheses for display
eval code : current-module
;; => (1 2 3)
The form =' 1 2 3= is a shorthand to create an *immutable*
([[https://standards.scheme.org/corrected-r7rs/r7rs-Z-H-6.html][literal]]) list that is =equal?= to =list 1 2 3=.
-But some operations like =list-set! the-list index new-value= from =srfi :1= do not work on immutable lists.
+Some operations like =list-set! the-list index new-value= from =srfi :1= do not work on immutable lists.
#+begin_src wisp :results output :exports both :wrap SRC compilation
define mutable-list : list 1 2 3
#+begin_src wisp :results output :exports both
import : srfi :26 cut
-and=> #f : cut + <> 3 ;; #f
-and=> 20 : cut + <> 3 ;; 23
+and=> #f : cut + <> 3 ;; #f ;; and=> applies logic, if its
+and=> 20 : cut + <> 3 ;; 23 ;; first argument is not #f
#+end_src
/This method is known in mathematics as “currying“./
: $3 = 1
:
-Vectors have the literal form =#(a b c)=. It is an error to mutate these.
+Vectors have the literal form =#(a b c)=. It is an error to mutate this.
#+begin_src wisp :results output :exports both :wrap SRC compilation
import : scheme base
make-tree kind height-m weight-kg carbon-kg
. tree?
kind tree-kind ;; the kind of tree, e.g. "birch"
- height-m tree-height
- weight-kg tree-weight
- carbon-kg tree-carbon
+ height-m tree-height ;; the second argument is the
+ weight-kg tree-weight ;; name for the logic to get
+ carbon-kg tree-carbon ;; the value from the record
define birch-young
make-tree "birch" 13 90 45 ;; 10 year, 10cm diameter,
;; Wisp execution !#
import : example trees
. birch-young
-
#+end_src
: $1 = #f
;; unhandled exception stops execution
define : add-5 input
+ 5 input ;; illegal for text
-map add-5 : list "five" 6 "seven"
-;; check inputs
+map add-5 : list "five" 6 "seven" ;; see the error
+;; check inputs to avoid the exception
define : add-5-if input
if : number? input
+ 5 input
map add-5-handler : list "five" 6 "seven"
#+end_src
-In Wisp checking inputs is often cheaper than exception handling. Format replaces patterns (here: =~s=) in text with values
+In Wisp checking inputs is often cheaper than exception handling. Format replaces patterns (here: =~S=) in text with values
(here =input=).
#+latex: \clearpage
:END:
To find the cause of an exception, you can use backtraces. When you
-see an error interactively, you can get a backtrace with =,bt=:
+see an error interactively, you get a backtrace with =,bt=:
#+begin_src wisp :results output :exports code :wrap SRC compilation
define : add-5 input
The number in square brackets after the interactive error (=[1]=) is
your depth in the debugger. You can get one level back with =,q= or
-=CTRL-D= (when outside the debugger, this exits from Guile).
-
-To throw debuggable errors yourself, use =raise-exception=.
-Also see the chapter [[https://www.gnu.org/software/guile/manual/html_node/Exceptions.html][Exceptions]] in the Guile Reference Manual.
+=CTRL-D= (when outside the debugger this exits from Guile).
+
+To throw debuggable errors yourself, use =raise-exception= or
+=scm-error=. Also see the chapter [[https://www.gnu.org/software/guile/manual/html_node/Exceptions.html][Exceptions]] in the Guile Reference
+Manual.
#+latex: \clearpage
#+html: <p class="back-to-map"><em><a href="#map-of-scheme">🗺 back to the map</a></em></p>
pretty-print "Hello"
for-each pretty-print args
-;; v evaluated first
-hello-printer 1 : pretty-print "second"
+hello-printer 1
+ pretty-print "second" ;; evaluated first
. 3 4
;; prints "second" "Hello" 1 3 4
#+end_src
:END:
#+begin_src wisp :results output :exports both :wrap SRC compilation
-define : tree-manual type height weight
+define : tree-with-list-cons type height weight
. "Create a tree with list and cons."
- list : cons 'type type
- cons 'height height
- cons 'weight weight
-tree-manual "birch" 13 90
+ list : cons 'type type ;; cons-created pairs are
+ cons 'height height ;; more efficient that lists
+ cons 'weight weight ;; see pair? and assoc
+tree-with-list-cons "birch" 13 90
define : tree-quasiquote type height weight
. "Create a tree with raw quasiquote and unquote."
define oak-carbon/kg '(7000 7700 8000)
;; append merges lists
append birch-carbon/kg
- . oak-carbon/kg
+ . oak-carbon/kg
;; unquote-splicing splices a list into quasiquote (`)
` : unquote-splicing birch-carbon/kg
unquote-splicing oak-carbon/kg
#+latex: \ThisLRCornerWallPaper{0.29}{programming-scheme-dryad}%
-Is your code correct?
+/Is your logic correct?/
#+begin_src wisp :results output :exports both :wrap SRC compilation
import : srfi :64 testsuite
define result : run-tests
#+end_src
-You can use this anywhere.
-
-For details, see [[https://srfi.schemers.org/srfi-64/srfi-64.html][srfi 64]].
+You can use this anywhere to guard against mistakes.
+
+For details, see [[https://srfi.schemers.org/srfi-64/srfi-64.html][srfi 64]]. Take care to test edge cases.
#+html: <img src="programming-scheme-dryad.png" style="width: 100%; max-width: 100%;" />
;; properties can be set manually.
define variable #f
set-object-property! variable 'documentation
- . "Variable is documented" ;; returns the value
+ . "Variable is documented" ;; returns the value it sets
object-property variable 'documentation
#+end_src
: $3 = "Variable is documented"
:
-You can get the documentation with =help= or =,d= on the REPL:
+You can get the documentation with =help= or =,d= in the REPL:
: ,d documented-proc => Proc is documented
: ,d variable => Variable is documented
# Reduce spacing of the list items
#+latex: \setlength{\itemsep}{0pt}
-- the [[https://www.gnu.org/s/guile/manual/guile.html][Guile Reference manual]]
-- the [[https://www.nongnu.org/guile-lib/doc/][Guile Library]]
+- The [[https://www.gnu.org/s/guile/manual/guile.html][Guile Reference Manual]]
+- The [[https://www.nongnu.org/guile-lib/doc/][Guile Library]]
- [[https://srfi.schemers.org/][Scheme Requests for Implementation (SRFI)]]: tagged libraries
- The [[https://standards.scheme.org/][Scheme standards (RnRS)]], specifically [[https://standards.scheme.org/corrected-r7rs/r7rs.html][r7rs-small]] ([[https://standards.scheme.org/unofficial/errata-corrected-r7rs.pdf][pdf]])
-- a list of [[https://www.gnu.org/software/guile/libraries/][tools and libraries]]
+- A list of [[https://www.gnu.org/software/guile/libraries/][tools and libraries]]
- [[https://rosettacode.org/wiki/Category:Scheme][Rosetta Code]] with solutions to many algorithm problems
*Info manuals* can often be read online, but the =info= commandline
-application and =info= in Emacs (=C-h i=) are far more efficient and
-provide full-text search. You can use them to read the Guile reference
-manual and some libraries. Get one by installing [[https://www.gnu.org/software/texinfo/][texinfo]] or [[https://gnu.org/software/emacs][Emacs]].
+application and =info= in Emacs (=C-h i=) are more efficient and
+provide full-text search. You can use them to read the Guile Reference
+Manual and some libraries. Get one by installing [[https://www.gnu.org/software/texinfo/][texinfo]] or [[https://gnu.org/software/emacs][Emacs]].
In *interactive* =wisp= (the REPL), you can check documentation:
@end example
#+end_src
-Add a =Makefile= in the doc/ folder:
+Add a =Makefile= in the doc/ folder. Make sure to indent with tab.
#+begin_src makefile :tangle hello/doc/Makefile
all: hello.info hello.epub hello_html/index.html
#+end_src
/The HTML output is plain. You can adapt it with CSS by adding
-=--css-include=FILENAME= or =--css-ref=URL= to =make info=./
-
-/Alternately you can write an [[https://orgmode.org][Org Mode]] document and evaluate
+=--css-include=FILENAME= or =--css-ref=URL= to =makeinfo=./
+
+/You can also write an [[https://orgmode.org][Org Mode]] document and evaluate
=(require 'ox-texinfo)= to activate exporting to texinfo./
# For regular Guile programs, add guild doc-snarf.
:CUSTOM_ID: vcs
:END:
-For convenience, first initialize a version tracking repository, for example [[https://mercurial-scm.org][Mercurial]] or [[https://git-scm.org][Git]].
+For convenience always start by initializing a version tracking
+repository, for example using [[https://mercurial-scm.org][Mercurial]] or [[https://git-scm.org][Git]].
#+begin_src bash
# either Mercurial
Create a =configure.ac= file with name, contact info, and version.
#+begin_src autoconf :tangle hello/configure.ac
-# Name, Version, and contact information.
+# Project name, version, and contact information.
AC_INIT([hello], [0.0.1], [my-name@example.com])
# Find a supported Guile version and set it as @GUILE@
GUILE_PKG([3.0])
GUILE_SITE_DIR
AC_PREFIX_PROGRAM([guile])
AM_INIT_AUTOMAKE([gnu])
+# create Makefile from Makefile.am
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#+end_src
The rest of the Makefile.am can be copied verbatim:
-#+latex: \ThisLRCornerWallPaper{0.618}{programming-scheme-packaged}%
-
#+latex: \small
#+begin_src makefile-automake :noweb-ref makefile-guile-technical
## Makefile.am technical details
# precompile all source files
.w.go:
- $(GUILE_TOOLS) compile --from=wisp $(GUILE_WARNINGS) \
+ GUILE_LOAD_COMPILED_PATH=@abs_top_builddir@ \
+ $(GUILE_TOOLS) compile --from=wisp $(GUILE_WARNINGS) \
+ -L @abs_top_builddir@ -L @abs_top_srcdir@ \
-o "$@" "$<"
#+end_src
#+latex: \clearpage
+#+latex: \ThisLRCornerWallPaper{0.38}{programming-scheme-packaged}%
+
/This assumes that the folder =hello= uses a [[#vcs][Version tracking system]]./
+
#+begin_src makefile-automake :noweb-ref makefile-gnufiles
## Makefile.am basic additional files
.SECONDARY: ChangeLog AUTHORS
:CUSTOM_ID: deploy
:END:
-Enable people to access your project as a webserver behind nginx, as
-clientside browser-app, or as Linux package (Guix tarball).
+Enable people to access your project as a webserver behind nginx, as a
+clientside browser-app, or as a Linux package (Guix tarball).
*Browser: as webserver.*
/On the web no one knows you’re a Scheme./
web uri
define : handler request body
define path : uri-path : request-uri request
- values
+ values ;; these are what the browser sees
build-response
. #:headers `((content-type . (text/plain)))
. #:code 404
string-append "404 not found: " path ;; content
define v4 #t
;; choose either IPv4 or IPv6; to suport both, run twice.
-;; run-server handler 'http
-;; if v4 '(#:port 8081) '(#:family AF_INET6 #:port 8081)
+run-server handler 'http
+ if v4 '(#:port 8081) '(#:family AF_INET6 #:port 8081)
#+end_src
#+RESULTS:
#+begin_src wisp :results output :tangle hoot.w
;; file: hoot.w
-use-modules : hoot ffi ;; guile-specific import
+;; guile-specific import
+use-modules : hoot ffi
;; the interface
define-foreign document-body "document" "body"
Transpile with =wisp2lisp= and =guild compile-wasm=. If you run Guix:
#+begin_src bash
-wisp2lisp hoot.w > hoot.scm && \
- guix shell guile-hoot guile-next -- \
- guild compile-wasm -o hoot.wasm hoot.scm
+guile shell guile guile-wisp -- \
+ wisp2lisp hoot.w > hoot.scm && \
+ guix shell guile-hoot guile-next -- \
+ guild compile-wasm -o hoot.wasm hoot.scm
#+end_src
Get reflection tools from Guile Hoot (licensed Apache 2.0) with Guix:
/* file: hoot.js */
window.addEventListener("load", () =>
Scheme.load_main("./hoot.wasm", {
- user_imports: { document: {
- body() { return document.body; },
- createTextNode: Document.prototype
- .createTextNode.bind(document)
- }, element: {
+ user_imports: { // mapped via define-foreign
+ document: {
+ body() { return document.body; },
+ createTextNode: Document.prototype
+ .createTextNode.bind(document)
+ },
+ element: {
appendChild(parent, child) {
- return parent.appendChild(child);}}}}));
+ return parent.appendChild(child);}}}}));
#+end_src
Include =reflect.js= and =hoot.js= from a HTML page:
#+begin_export latex
\thispagestyle{empty}
+\phantomsection
\makebox(\textwidth,\textheight){% lie about the size so it stays on its page
\vspace*{-4em}
-\fbox{\begin{minipage}{30em}\vspace*{-3.75em}\label{listoflinks}\label{LastPage}
+\fbox{\begin{minipage}{30em}\vspace*{-3.75em}
\scriptsize
\listoflinks
+\label{listoflinks}\label{LastPage}
\end{minipage}}}
#+end_export
# list of links
#+latex: \clearpage
#+latex: \thispagestyle{empty}
-#+latex: \addtocounter{page}{-1}~
+#+latex: \addtocounter{page}{-1}
+#+latex: ~
#+latex: \clearpage
#+latex: \thispagestyle{empty}
-#+latex: \addtocounter{page}{-1}~
+#+latex: \addtocounter{page}{-1}
+#+latex: ~
#+latex: \clearpage
#+begin_export latex
Binary file software/programming-scheme-tree.png has changed
handling, but exception handling needs less information about
implementation details.
-Format replaces patterns (here: =~s=) in text with values (here
+Format replaces patterns (here: =~S=) in text with values (here
=input=).
#+latex: \clearpage
Binary file software/vorlesung-netztechnik-0-uebersicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-0-uebersicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-1-physikalische-schicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-1-physikalische-schicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-2-sicherungsschicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-2-sicherungsschicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-3-mac-schicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-3-mac-schicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-4-vermittlungsschicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-4-vermittlungsschicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-5-transportschicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-5-transportschicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-6-anwendungsschicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-6-anwendungsschicht-thumb.png has changed
Binary file software/vorlesung-netztechnik-7-anwendungsschicht-nup-thumb.png has changed
Binary file software/vorlesung-netztechnik-7-anwendungsschicht-thumb.png has changed
colleagues that are used to Python but want to explore the realms of
functional programming without … having to break with known syntax
and conventions … it makes Scheme way more “approachable”«/ ---
- [[https://emacs.ch/@thees][Wilko]] in a [[https://emacs.ch/@thees/111720771253976695][reply on Mastodon]].\\
+ [[https://me.literatelisp.eu/][Wilko]] in a [[https://emacs.ch/@thees/111720771253976695][reply on Mastodon]].\\
💪 Wisp works! 🎇
#+end_kasten
Alles fühlt sich leicht an, wenn ihr alle Vorraussetzungen dafür erfüllt. Welche das sind zeigt sich aber erst, wenn ihr sie gerade nicht erfüllen könnt.\\
--- Arne Babenhauserheide ([[https://rollenspiel.social/@ArneBab/115447508158958179][2025-10-27 Mo]])
+*
+ :PROPERTIES:
+ :CUSTOM_ID: brains-survival-machines
+ :ID: e2dd0f92-44a2-43e2-9ab2-307c0fbfd7f8
+ :PUBDATE: 2025-10-29 Mi 00:58
+ :END:
+
+Human brains are not logic machines, they are survival machines.\\
+--- unknown source, quoted by Jouzou87 ([[https://www.youtube.com/watch?v=Omc37TvHN74&lc=Ugw8B1COHJPyN0uezAB4AaABAg][2025-09]])
+