added doi

This commit is contained in:
2025-07-31 12:59:04 +02:00
parent eb2d14ba98
commit deb3fc9b02
42 changed files with 3811 additions and 3449 deletions

View File

@ -26,7 +26,9 @@ authors:
- Validation
- "Writing original draft"
- "Writing review & editing"
citation: true
citation:
doi: 10.5281/zenodo.16633122
url: https://drezil.de/Writing/coding-age-ai.html
google-scholar: true
fileClass: authored
bibliography:
@ -264,6 +266,7 @@ onesentence feature description plus any additional Q&A with the stakeholder.
it in _Open Questions_.
4. After questions are answered reply exactly: Ready to generate the PRD.
5. On a user message that contains only the word "go" (caseinsensitive):
- Generate /tasks/<feature>/PRD.md following _Output_ spec.
- Reply: <feature>/PRD.md created review it.
@ -324,16 +327,19 @@ Every specification should include:
```
2. **Scope and Boundaries**
- What is included/excluded
- Dependencies on other specifications
- Relationship to other components
3. **Detailed Requirements**
- Structured by logical sections
- Clear, unambiguous language
- Examples where helpful
4. **Error Handling**
- How errors should be handled
- Fallback behaviors
- Edge cases

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -32,17 +32,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -95,7 +97,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -128,7 +130,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -168,7 +170,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -196,7 +198,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -219,17 +221,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -240,7 +245,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -252,6 +257,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -263,12 +270,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -306,6 +313,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -349,12 +360,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -659,7 +664,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -32,17 +32,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -95,7 +97,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -128,7 +130,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -168,7 +170,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -196,7 +198,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -219,17 +221,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -240,7 +245,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -252,6 +257,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -263,12 +270,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -306,6 +313,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -349,12 +360,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -688,7 +693,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

49
dist/About/Work.html vendored
View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -32,17 +32,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -94,7 +96,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -127,7 +129,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -167,7 +169,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -195,7 +197,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -218,17 +220,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -239,7 +244,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -251,6 +256,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -262,12 +269,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -305,6 +312,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -348,12 +359,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -707,7 +712,7 @@ Was later a “nanny for everything”.</li>
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

49
dist/About/index.html vendored
View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -32,16 +32,18 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -93,7 +95,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -126,7 +128,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -166,7 +168,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -194,7 +196,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -217,17 +219,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -238,7 +243,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -250,6 +255,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -261,12 +268,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -304,6 +311,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -347,12 +358,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -713,7 +718,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const isCodeAnnotation = (el) => {
for (const clz of el.classList) {
if (clz.startsWith('code-annotation-')) {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../../">
<script src="../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -696,7 +701,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../../">
<script src="../../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -131,7 +133,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -164,7 +166,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -204,7 +206,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -232,7 +234,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -255,17 +257,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -276,7 +281,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -288,6 +293,8 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -299,12 +306,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -342,6 +349,10 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -385,12 +396,6 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<a href="../../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -663,7 +668,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<p>Stellen wir uns vor, dass wir eine Funktion schreiben, die einen String bekommt (mehrere Lines mit ACSII-Text) und dieses Wort-für-Wort rückwärts ausgeben soll. Das ist ein einfacher Einzeiler:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">module</span> <span class="dt">Main</span> <span class="kw">where</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">module</span> <span class="dt">Main</span> <span class="kw">where</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">System.Environment</span> (getArgs)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Data.Monoid</span> (mconcat)</span>
@ -671,30 +676,30 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a>main <span class="ot">=</span> <span class="kw">do</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> ls <span class="ot">&lt;-</span> <span class="fu">readFile</span> <span class="op">=&lt;&lt;</span> <span class="fu">head</span> <span class="op">&lt;$&gt;</span> getArgs</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">mconcat</span> <span class="op">&lt;$&gt;</span> <span class="fu">mapM</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>) (<span class="fu">lines</span> ls) <span class="co">--die eigentliche Funktion, ls ist das argument.</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">mconcat</span> <span class="op">&lt;$&gt;</span> <span class="fu">mapM</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>) (<span class="fu">lines</span> ls) <span class="co">--die eigentliche Funktion, ls ist das argument.</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Was passiert hier an Vodoo? Und was machen die ganzen wilden Zeichen da?</p>
<p>Gehen wir die Main zeilenweise durch: Wir lesen die Datei, die im ersten Kommandozeilen-Argument gegeben wird. getArgs hat folgende Signatur:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ot">getArgs ::</span> <span class="dt">IO</span> [<span class="dt">String</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ot">getArgs ::</span> <span class="dt">IO</span> [<span class="dt">String</span>]</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Wir bekommen als eine Liste der Argumente. Wir wollen nur das erste. Also machen wir head getArgs. Allerdings fliegt uns dann ein Fehler. head sieht nämlich so aus:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span><span class="ot"> ::</span> [a] <span class="ot">-&gt;</span> a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span><span class="ot"> ::</span> [a] <span class="ot">-&gt;</span> a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Irgendwie müssen wird as <strong>in</strong> das IO bekommen. Hierzu gibt es fmap. Somit ist</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span><span class="ot"> head ::</span> <span class="dt">IO</span> [a] <span class="ot">-&gt;</span> <span class="dt">IO</span> a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span><span class="ot"> head ::</span> <span class="dt">IO</span> [a] <span class="ot">-&gt;</span> <span class="dt">IO</span> a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Ein inline-Alias (um die Funktion links und das Argument rechts zu schreiben und sich ne Menge Klammern zu sparen) ist &lt;$&gt;. Somit ist schlussendlich der Inhalt der Datei aus dem ersten Argument (lazy) in ls.</p>
<p>Eine andere Möglichkeit sich das (in diesem Fall) zu merken, bzw. drauf zu kommen ist, dass [] AUCH ein Funktor (sogar eine Monade) ist. Man könnte das also auch so schreiben:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span><span class="ot"> ::</span> [] a <span class="ot">-&gt;</span> a</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span><span class="ot"> ::</span> [] a <span class="ot">-&gt;</span> a</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span><span class="ot"> ::</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> [] (f a) <span class="ot">-&gt;</span> f a <span class="co">-- das "a" geschickt ersetzt zur Verdeutlichung</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="ot">getArgs ::</span> <span class="dt">IO</span> [] <span class="dt">String</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span><span class="ot"> head ::</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> f [] a <span class="ot">-&gt;</span> f a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span><span class="ot"> head ::</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> f [] a <span class="ot">-&gt;</span> f a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>fmap “packt” die Funktion quasi 1 Umgebung (Funktor, Monade, ..) weiter rein - Sei es nun in Maybe, Either oder irgendwas anderes.</p>
<p>Alternatives (ausführliches) Beispiel am Ende.</p>
<p>Wenn wir uns die Signatur ansehen, dann haben wir nun</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> <span class="op">&lt;$&gt;</span><span class="ot"> getArgs ::</span> <span class="dt">IO</span> <span class="dt">String</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> <span class="op">&lt;$&gt;</span><span class="ot"> getArgs ::</span> <span class="dt">IO</span> <span class="dt">String</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>readFile will aber nun ein String haben. Man kann nun</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>f <span class="ot">&lt;-</span> <span class="fu">head</span> <span class="op">&lt;$&gt;</span> getArgs</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>ls <span class="ot">&lt;-</span> <span class="fu">readFile</span> f</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>f <span class="ot">&lt;-</span> <span class="fu">head</span> <span class="op">&lt;$&gt;</span> getArgs</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>ls <span class="ot">&lt;-</span> <span class="fu">readFile</span> f</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>kann man auch “inline” mit =&lt;&lt; die Sachen “auspacken”.</p>
<p>Die 2. Zeile lesen wir nun einfach “von hinten”, wie man das meistens tun sollte. Hier ist ein</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">lines</span><span class="ot"> ls ::</span> [<span class="dt">String</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">lines</span><span class="ot"> ls ::</span> [<span class="dt">String</span>]</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>was uns den Inhalt der Datei zeilenweise gibt. Mit jeder Zeile möchten wir nun folgendes machen:</p>
<ol type="1">
<li>nach Wörtern trennen (words)</li>
@ -703,42 +708,42 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<li>diese Zeile ausgeben (putStrLn)</li>
</ol>
<p>Wenn wir uns die Signatur ansehen:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>(<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>)<span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> ()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>(<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>)<span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> ()</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Das mag im ersten Moment verwirren, daher noch die Signaturen der Einzelfunktionen:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">words</span><span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> [<span class="dt">String</span>]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">words</span><span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> [<span class="dt">String</span>]</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="fu">reverse</span><span class="ot"> ::</span> [a] <span class="ot">-&gt;</span> [a]</span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="fu">unwords</span><span class="ot"> ::</span> [<span class="dt">String</span>] <span class="ot">-&gt;</span> <span class="dt">String</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="fu">putStrLn</span><span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> ()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="fu">putStrLn</span><span class="ot"> ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> ()</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Da wir am Ende in der IO-Monade landen müssen wir das auf unsere Zeilen mit mapM statt map anwenden. Dies sorgt auch dafür, dass die Liste der reihe nach durchgegangen wird. mapM mit unserer Funktion schaut dann so aus:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mapM</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>)<span class="ot"> ::</span> [<span class="dt">String</span>] <span class="ot">-&gt;</span> [<span class="dt">IO</span> ()]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mapM</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>)<span class="ot"> ::</span> [<span class="dt">String</span>] <span class="ot">-&gt;</span> [<span class="dt">IO</span> ()]</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>eek! Das [IO ()] sieht ekelig aus. Wir haben eine Liste von IO-gar nichts. Das können wir eigentlich entsorgen. Da wir innerhalb der main-Funktion in einer IO-Monade sind, wollen wir IO () anstatt [IO ()] zurück haben.</p>
<p>Wenn wir uns jetzt erinnern, dass [] auch nur eine Monade ist und dass jede Monade ein Monoid ist, dann ist die Lösung einfach. Monoide haben eine “append”-funktion (mappend oder (&lt;&gt;) genannt). Wenn wir “nichts” an “nichts” anhängen, dann erhalten wir …. <em>Trommelwirbel</em> “nichts”! Wir müssen die [IO ()]-Liste also “nur noch” mit mappend falten. Hierzu gibt es schon eine vorgefertigte Funktion:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mconcat</span><span class="ot"> ::</span> [a] <span class="ot">-&gt;</span> a</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">mconcat</span> <span class="ot">=</span> <span class="fu">foldr</span> <span class="fu">mappend</span> <span class="fu">mempty</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mconcat</span><span class="ot"> ::</span> [a] <span class="ot">-&gt;</span> a</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">mconcat</span> <span class="ot">=</span> <span class="fu">foldr</span> <span class="fu">mappend</span> <span class="fu">mempty</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Was genau die gewünschte Faltung macht. Wir müssen nun wieder fmap nehmen, da wir die Liste selbst falten wollen - und nicht map, welches auf den IO () innerhalb der Liste arbeiten würde. Durch die Faltung fällt die Liste nun auf IO () zusammen.</p>
<p>Viel Voodoo in wenig Code, aber wenn man sich dran gewöhnt hat, sind Monaden in Monaden auch nicht schlimm. Man muss sich immer nur richtig “rein” fmapen.</p>
<hr>
<p>Kleinen Tipp gab es noch: mapM_ macht genau das, was oben mit mconcat erreicht werden sollte. Somit kann man auch</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mapM_</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>) (<span class="fu">lines</span> ls)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mapM_</span> (<span class="fu">putStrLn</span> <span class="op">.</span> <span class="fu">unwords</span> <span class="op">.</span> <span class="fu">reverse</span> <span class="op">.</span> <span class="fu">words</span>) (<span class="fu">lines</span> ls)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>schreiben. Ich hab es aber mal wegen der klarheit oben so gelassen.</p>
<section id="alternatives-fmap-beispiel" class="level2">
<h2 class="anchored" data-anchor-id="alternatives-fmap-beispiel">Alternatives fmap-Beispiel</h2>
<p>Nehmen wir als alternatives Beispiel mal an:</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ot">a ::</span> <span class="dt">IO</span> <span class="dt">Maybe</span> <span class="dt">State</span> t</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ot">a ::</span> <span class="dt">IO</span> <span class="dt">Maybe</span> <span class="dt">State</span> t</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Um Funktionen vom Typ</p>
<div class="sourceCode" id="cb15"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f ::</span> <span class="dt">IO</span> a <span class="ot">-&gt;</span> <span class="dt">IO</span> a</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>f a <span class="co">-- valide</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f ::</span> <span class="dt">IO</span> a <span class="ot">-&gt;</span> <span class="dt">IO</span> a</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>f a <span class="co">-- valide</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>zu nehmen, brauchen wir nichts machen. Bei</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f' ::</span> <span class="dt">Maybe</span> a <span class="ot">-&gt;</span> <span class="dt">Maybe</span> a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f' ::</span> <span class="dt">Maybe</span> a <span class="ot">-&gt;</span> <span class="dt">Maybe</span> a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>brauchen wir 1 fmap, also ein</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>f' a <span class="co">-- error</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>f' <span class="op">&lt;$&gt;</span> a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>f' a <span class="co">-- error</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>f' <span class="op">&lt;$&gt;</span> a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>um eine Funktion</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f'' ::</span> <span class="dt">State</span> t <span class="ot">-&gt;</span> <span class="dt">State</span> t</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ot">f'' ::</span> <span class="dt">State</span> t <span class="ot">-&gt;</span> <span class="dt">State</span> t</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>zu benutzen folglich:</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>f'' a <span class="co">-- error</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>f'' a <span class="co">-- error</span></span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>f'' <span class="op">&lt;$&gt;</span> a <span class="co">-- error</span></span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span> f'' <span class="op">&lt;$&gt;</span> a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="fu">fmap</span> f'' <span class="op">&lt;$&gt;</span> a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
@ -758,7 +763,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../../">
<script src="../../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -133,7 +135,7 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -166,7 +168,7 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -206,7 +208,7 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -234,7 +236,7 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -257,17 +259,20 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -278,7 +283,7 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -290,6 +295,8 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -301,12 +308,12 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -344,6 +351,10 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -387,12 +398,6 @@ Knowing that this might sound daunting to many dabbling Haskellers (like I am),
<a href="../../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -679,45 +684,45 @@ Note
<p>For those who need a refresher: MergeSort works by creating a balanced binary tree from the input list and directly collapsing it back into itself while treating the children as sorted lists and merging these with an O(n) algorithm.</p>
<hr>
<p>First the usual prelude:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveFunctor #-}</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveFunctor #-}</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE TypeFamilies #-}</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Data.Functor.Foldable</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Data.List</span> (splitAt, unfoldr)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Data.List</span> (splitAt, unfoldr)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>We will use a binary tree like this. Note that there is no explicit recursion used, but <code>NodeF</code> has two <em>holes</em>. These will eventually filled later.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">TreeF</span> c f <span class="ot">=</span> <span class="dt">EmptyF</span> <span class="op">|</span> <span class="dt">LeafF</span> c <span class="op">|</span> <span class="dt">NodeF</span> f f</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Show</span>, <span class="dt">Functor</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">TreeF</span> c f <span class="ot">=</span> <span class="dt">EmptyF</span> <span class="op">|</span> <span class="dt">LeafF</span> c <span class="op">|</span> <span class="dt">NodeF</span> f f</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Show</span>, <span class="dt">Functor</span>)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>Aside: We could use this as a <em>normal</em> binary tree by wrapping it in <code>Fix</code>: <code>type Tree a = Fix (TreeF a)</code> But this would require us to write our tree like <code>Fix (NodeF (Fix (LeafF 'l')) (Fix (LeafF 'r')))</code> which would get tedious fast. Luckily Edward build a much better way to do this into <em>recursion-schemes</em>. I will touch on this later.</p>
<hr>
<p>Without further ado we start to write a Coalgebra, which in my book is just a scary name for “function that is used to construct datastructures”.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ot">unflatten ::</span> [a] <span class="ot">-&gt;</span> <span class="dt">TreeF</span> a [a]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ot">unflatten ::</span> [a] <span class="ot">-&gt;</span> <span class="dt">TreeF</span> a [a]</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>unflatten ( []) <span class="ot">=</span> <span class="dt">EmptyF</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>unflatten (x<span class="op">:</span>[]) <span class="ot">=</span> <span class="dt">LeafF</span> x</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>unflatten ( xs) <span class="ot">=</span> <span class="dt">NodeF</span> l r <span class="kw">where</span> (l,r) <span class="ot">=</span> <span class="fu">splitAt</span> (<span class="fu">length</span> xs <span class="ot">`div`</span> <span class="dv">2</span>) xs</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>unflatten ( xs) <span class="ot">=</span> <span class="dt">NodeF</span> l r <span class="kw">where</span> (l,r) <span class="ot">=</span> <span class="fu">splitAt</span> (<span class="fu">length</span> xs <span class="ot">`div`</span> <span class="dv">2</span>) xs</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>From the type signature its immediately obvious, that we take a list of as and use it to create a part of our tree.</p>
<p>The nice thing is that due to the fact that we havent commited to a type in our tree nodes we can just put lists in there.</p>
<hr>
<p>Aside: At this point we could use this Coalgebra to construct (unsorted) binary trees from lists:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>example1 <span class="ot">=</span> ana unflatten [<span class="dv">1</span>,<span class="dv">3</span>] <span class="op">==</span> <span class="dt">Fix</span> (<span class="dt">NodeF</span> (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">1</span>)) (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">3</span>)))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>example1 <span class="ot">=</span> ana unflatten [<span class="dv">1</span>,<span class="dv">3</span>] <span class="op">==</span> <span class="dt">Fix</span> (<span class="dt">NodeF</span> (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">1</span>)) (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">3</span>)))</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>On to our sorting, tree-collapsing Algebra. Which again is just a creepy word for “function that is used to deconstruct datastructures”.</p>
<p>The function <code>mergeList</code> is defined below and just merges two sorted lists into one sorted list in O(n), I would probably take this from the <code>ordlist</code> package if I were to implement this <em>for real</em>.</p>
<p>Again we see that we can just construct our sorted output list from a <code>TreeF</code> that apparently contains just lists.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ot">flatten ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> <span class="dt">TreeF</span> a [a] <span class="ot">-&gt;</span> [a]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ot">flatten ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> <span class="dt">TreeF</span> a [a] <span class="ot">-&gt;</span> [a]</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>flatten <span class="dt">EmptyF</span> <span class="ot">=</span> []</span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>flatten (<span class="dt">LeafF</span> c) <span class="ot">=</span> [c]</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>flatten (<span class="dt">NodeF</span> l r) <span class="ot">=</span> mergeLists l r</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>flatten (<span class="dt">NodeF</span> l r) <span class="ot">=</span> mergeLists l r</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>Aside: We could use a Coalgebra to deconstruct trees:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>example2 <span class="ot">=</span> cata flatten (<span class="dt">Fix</span> (<span class="dt">NodeF</span> (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">3</span>)) (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">1</span>)))) <span class="op">==</span> [<span class="dv">1</span>,<span class="dv">3</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>example2 <span class="ot">=</span> cata flatten (<span class="dt">Fix</span> (<span class="dt">NodeF</span> (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">3</span>)) (<span class="dt">Fix</span> (<span class="dt">LeafF</span> <span class="dv">1</span>)))) <span class="op">==</span> [<span class="dv">1</span>,<span class="dv">3</span>]</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>Now we just combine the Coalgebra and the Algebra with one from the functions from Edwards <code>recursion-schemes</code> library:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ot">mergeSort ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> [a]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ot">mergeSort ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> [a]</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>mergeSort <span class="ot">=</span> hylo flatten unflatten</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>example3 <span class="ot">=</span> mergeSort [<span class="dv">5</span>,<span class="dv">2</span>,<span class="dv">7</span>,<span class="dv">9</span>,<span class="dv">1</span>,<span class="dv">4</span>] <span class="op">==</span> [<span class="dv">1</span>,<span class="dv">2</span>,<span class="dv">4</span>,<span class="dv">5</span>,<span class="dv">7</span>,<span class="dv">9</span>]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>example3 <span class="ot">=</span> mergeSort [<span class="dv">5</span>,<span class="dv">2</span>,<span class="dv">7</span>,<span class="dv">9</span>,<span class="dv">1</span>,<span class="dv">4</span>] <span class="op">==</span> [<span class="dv">1</span>,<span class="dv">2</span>,<span class="dv">4</span>,<span class="dv">5</span>,<span class="dv">7</span>,<span class="dv">9</span>]</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<hr>
<p>What have we gained?</p>
<p>We have implemented a MergeSort variant in 9 lines of code, not counting the <code>mergeLists</code> function below. Not bad, but <a href="http://en.literateprograms.org/Merge_sort_(Haskell)">this implementation</a> is not much longer.</p>
@ -726,7 +731,7 @@ Note
<hr>
<p>At this point I wasnt sure if this was useful or remotely applicable. Telling someone “I spend a whole weekend learning about Hylomorphism” isnt something the cool developer kids do.</p>
<p>It appeared to me that maybe I should have a look at the Core to see what the compiler finally comes up with (edited for brevity):</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ot"> mergeSort ::</span> [<span class="dt">Integer</span>] <span class="ot">-&gt;</span> [<span class="dt">Integer</span>]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ot"> mergeSort ::</span> [<span class="dt">Integer</span>] <span class="ot">-&gt;</span> [<span class="dt">Integer</span>]</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> mergeSort <span class="ot">=</span></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a> \ (<span class="ot">x ::</span> [<span class="dt">Integer</span>]) <span class="ot">-&gt;</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">case</span> x <span class="kw">of</span> wild {</span>
@ -753,17 +758,17 @@ Note
<span id="cb8-25"><a href="#cb8-25" aria-hidden="true" tabindex="-1"></a> <span class="kw">case</span> p <span class="kw">of</span> _ { (ds1, y) <span class="ot">-&gt;</span> mergeSort y }))</span>
<span id="cb8-26"><a href="#cb8-26" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb8-27"><a href="#cb8-27" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb8-28"><a href="#cb8-28" aria-hidden="true" tabindex="-1"></a> end <span class="dt">Rec</span> }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb8-28"><a href="#cb8-28" aria-hidden="true" tabindex="-1"></a> end <span class="dt">Rec</span> }</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>While I am not really competent in reading Core and this is actually the first time I bothered to try, it is immediately obvious that there is no trace of any intermediate tree structure.</p>
<p>This is when it struck me. I was dazzled and amazed. And am still. Although we are writing our algorithm as if we are working on a real tree structure the library and the compiler are able to just remove the whole intermediate step.</p>
<hr>
<p>Aftermath:</p>
<p>In the beginning I promised a way to work on non-functor data structures. Actually that was how I began to work with the <code>recursion-schemes</code> library.</p>
<p>We are able to create a normal version of our tree from above:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Tree</span> c <span class="ot">=</span> <span class="dt">Empty</span> <span class="op">|</span> <span class="dt">Leaf</span> c <span class="op">|</span> <span class="dt">Node</span> (<span class="dt">Tree</span> c) (<span class="dt">Tree</span> c)</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Show</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Tree</span> c <span class="ot">=</span> <span class="dt">Empty</span> <span class="op">|</span> <span class="dt">Leaf</span> c <span class="op">|</span> <span class="dt">Node</span> (<span class="dt">Tree</span> c) (<span class="dt">Tree</span> c)</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> <span class="kw">deriving</span> (<span class="dt">Eq</span>, <span class="dt">Show</span>)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>But we can not use this directly with our (Co-)Algebras. Luckily Edward build a little bit of type magic into the library:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="kw">instance</span> <span class="dt">Base</span> (<span class="dt">Tree</span> c) <span class="ot">=</span> (<span class="dt">TreeF</span> c)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="kw">instance</span> <span class="dt">Base</span> (<span class="dt">Tree</span> c) <span class="ot">=</span> (<span class="dt">TreeF</span> c)</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Unfoldable</span> (<span class="dt">Tree</span> c) <span class="kw">where</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> embed <span class="dt">EmptyF</span> <span class="ot">=</span> <span class="dt">Empty</span></span>
@ -773,10 +778,10 @@ Note
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Foldable</span> (<span class="dt">Tree</span> c) <span class="kw">where</span></span>
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a> project <span class="dt">Empty</span> <span class="ot">=</span> <span class="dt">EmptyF</span></span>
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a> project (<span class="dt">Leaf</span> c) <span class="ot">=</span> <span class="dt">LeafF</span> c</span>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> project (<span class="dt">Node</span> l r) <span class="ot">=</span> <span class="dt">NodeF</span> l r</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> project (<span class="dt">Node</span> l r) <span class="ot">=</span> <span class="dt">NodeF</span> l r</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Without going into detail by doing this we establish a relationship between <code>Tree</code> and <code>TreeF</code> and teach the compiler how to translate between these types.</p>
<p>Now we can use our Alebra on our non functor type:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>example4 <span class="ot">=</span> cata flatten (<span class="dt">Node</span> (<span class="dt">Leaf</span> <span class="ch">'l'</span>) (<span class="dt">Leaf</span> <span class="ch">'r'</span>)) <span class="op">==</span> <span class="st">"lr"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>example4 <span class="ot">=</span> cata flatten (<span class="dt">Node</span> (<span class="dt">Leaf</span> <span class="ch">'l'</span>) (<span class="dt">Leaf</span> <span class="ch">'r'</span>)) <span class="op">==</span> <span class="st">"lr"</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>The great thing about this is that, looking at the Core output again, there is no traces of the <code>TreeF</code> structure to be found. As far as I can tell, the algorithm is working directly on our <code>Tree</code> type.</p>
<hr>
<p>Literature:</p>
@ -788,13 +793,13 @@ Note
</ul>
<hr>
<p>Appendix:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ot">mergeLists ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> [a] <span class="ot">-&gt;</span> [a]</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ot">mergeLists ::</span> <span class="dt">Ord</span> a <span class="ot">=&gt;</span> [a] <span class="ot">-&gt;</span> [a] <span class="ot">-&gt;</span> [a]</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a>mergeLists <span class="ot">=</span> <span class="fu">curry</span> <span class="op">$</span> unfoldr c <span class="kw">where</span></span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> c ([], []) <span class="ot">=</span> <span class="dt">Nothing</span></span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> c ([], y<span class="op">:</span>ys) <span class="ot">=</span> <span class="dt">Just</span> (y, ([], ys))</span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> c (x<span class="op">:</span>xs, []) <span class="ot">=</span> <span class="dt">Just</span> (x, (xs, []))</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> c (x<span class="op">:</span>xs, y<span class="op">:</span>ys) <span class="op">|</span> x <span class="op">&lt;=</span> y <span class="ot">=</span> <span class="dt">Just</span> (x, (xs, y<span class="op">:</span>ys))</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> x <span class="op">&gt;</span> y <span class="ot">=</span> <span class="dt">Just</span> (y, (x<span class="op">:</span>xs, ys))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> x <span class="op">&gt;</span> y <span class="ot">=</span> <span class="dt">Just</span> (y, (x<span class="op">:</span>xs, ys))</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@ -813,7 +818,7 @@ Note
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../../">
<script src="../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -666,7 +671,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../">
<script src="../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -131,7 +133,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -164,7 +166,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -204,7 +206,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -232,7 +234,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -255,17 +257,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -276,7 +281,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -288,6 +293,8 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -299,12 +306,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -342,6 +349,10 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -385,12 +396,6 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<a href="../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -691,7 +696,7 @@ kann. Also einfachen Datenstruktur kann man einen Record mit der entsprechenden<
Syntax nehmen.</p>
<section id="beispiel" class="level3">
<h3 class="anchored" data-anchor-id="beispiel">Beispiel</h3>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> addr ::</span> <span class="dt">Address</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Address</span> <span class="ot">=</span> <span class="dt">A</span> {<span class="ot"> road ::</span> <span class="dt">String</span></span>
@ -705,7 +710,7 @@ Syntax nehmen.</p>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="ot"> setPostcode ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Person</span> <span class="ot">-&gt;</span> <span class="dt">Person</span></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> setPostcode pc p</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> p { addr <span class="ot">=</span> addr p { postcode <span class="ot">=</span> pc } }</span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="co">-- update of a record inside a record</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> <span class="co">-- update of a record inside a record</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="problem" class="level3">
<h3 class="anchored" data-anchor-id="problem">Problem</h3>
@ -720,7 +725,7 @@ interessiert sind</li>
</section>
<section id="was-wir-gern-hätten" class="level3">
<h3 class="anchored" data-anchor-id="was-wir-gern-hätten">Was wir gern hätten</h3>
<div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> addr ::</span> <span class="dt">Address</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- a lens for each field</span></span>
@ -731,12 +736,12 @@ interessiert sind</li>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="co">-- lens-composition</span></span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="ot">composeL ::</span> <span class="dt">Lens'</span> s1 s2 <span class="ot">-&gt;</span> <span class="dt">Lens</span> s2 a <span class="ot">-&gt;</span> <span class="dt">Lens'</span> s1 a</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="ot">composeL ::</span> <span class="dt">Lens'</span> s1 s2 <span class="ot">-&gt;</span> <span class="dt">Lens</span> s2 a <span class="ot">-&gt;</span> <span class="dt">Lens'</span> s1 a</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="wie-uns-das-hilft" class="level3">
<h3 class="anchored" data-anchor-id="wie-uns-das-hilft">Wie uns das hilft</h3>
<p>Mit diesen Dingen (wenn wir sie hätten) könnte man dann</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> name ::</span> <span class="dt">String</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> addr ::</span> <span class="dt">Address</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Address</span> <span class="ot">=</span> <span class="dt">A</span> {<span class="ot"> road ::</span> <span class="dt">String</span></span>
@ -744,7 +749,7 @@ interessiert sind</li>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> postcode ::</span> <span class="dt">String</span> }</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="ot">setPostcode ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Person</span> <span class="ot">-&gt;</span> <span class="dt">Person</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a>setPostcode pc p</span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> set (laddr <span class="ot">`composeL`</span> lpostcode) pc p</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> set (laddr <span class="ot">`composeL`</span> lpostcode) pc p</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>machen und wäre fertig.</p>
</section>
</section>
@ -752,12 +757,12 @@ interessiert sind</li>
<h2 class="anchored" data-anchor-id="trivialer-ansatz">Trivialer Ansatz</h2>
<section id="gettersetter-also-lens-methoden" class="level3">
<h3 class="anchored" data-anchor-id="gettersetter-also-lens-methoden">Getter/Setter also Lens-Methoden</h3>
<div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> setR ::</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s }</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>composeL (<span class="dt">L</span> v1 u1) (<span class="dt">L</span> v2 u2)</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="dt">L</span> (\s <span class="ot">-&gt;</span> v2 (v1 s))</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> (\a s <span class="ot">-&gt;</span> u1 (u2 a (v1 s)) s)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> (\a s <span class="ot">-&gt;</span> u1 (u2 a (v1 s)) s)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="wieso-ist-das-schlecht" class="level3">
<h3 class="anchored" data-anchor-id="wieso-ist-das-schlecht">Wieso ist das schlecht?</h3>
@ -766,110 +771,110 @@ interessiert sind</li>
</ul>
<p>Auslesen traversiert die Datenstruktur, dann wird die Function angewendet und<br>
zum setzen wird die Datenstruktur erneut traversiert:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">LensR</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>over ln f s <span class="ot">=</span> setR l (f (viewR l s)) s</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">LensR</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>over ln f s <span class="ot">=</span> setR l (f (viewR l s)) s</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<ul>
<li>Lösung: modify-funktion hinzufügen</li>
</ul>
<div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> setR ::</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> mod ::</span> (a<span class="ot">-&gt;</span>a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> modM ::</span> (a<span class="ot">-&gt;</span><span class="dt">Maybe</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> <span class="dt">Maybe</span> s</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> modIO ::</span> (a<span class="ot">-&gt;</span><span class="dt">IO</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> <span class="dt">IO</span> s }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> modIO ::</span> (a<span class="ot">-&gt;</span><span class="dt">IO</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> <span class="dt">IO</span> s }</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Neues Problem: Für jeden Spezialfall muss die Lens erweitert werden.</p>
</section>
<section id="something-in-common" class="level3">
<h3 class="anchored" data-anchor-id="something-in-common">Something in common</h3>
<p>Man kann alle Monaden abstrahieren. Functor reicht schon:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a</span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> setR ::</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> mod ::</span> (a<span class="ot">-&gt;</span>a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> modF ::</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> (a<span class="ot">-&gt;</span>f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> modF ::</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> (a<span class="ot">-&gt;</span>f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s }</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Idee: Die 3 darüberliegenden durch modF ausdrücken.</p>
</section>
<section id="typ-einer-lens" class="level3">
<h3 class="anchored" data-anchor-id="typ-einer-lens">Typ einer Lens</h3>
<p>Wenn man das berücksichtigt, dann hat einen Lens folgenden Typ:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Allerdings haben wir dann noch unseren getter/setter:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> setR ::</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">LensR</span> s a <span class="ot">=</span> <span class="dt">L</span> {<span class="ot"> viewR ::</span> s <span class="ot">-&gt;</span> a</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> setR ::</span> a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s }</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Stellt sich raus: Die sind isomorph! Auch wenn die von den Typen her komplett<br>
anders aussehen.</p>
</section>
</section>
<section id="benutzen-einer-lens-also-setter" class="level2">
<h2 class="anchored" data-anchor-id="benutzen-einer-lens-also-setter">Benutzen einer Lens also Setter</h2>
<div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>set ln a s <span class="ot">=</span> <span class="op">--...</span>umm<span class="op">...</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="op">--:</span>t ln <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- =&gt; get s out of f s to return it</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- =&gt; get s out of f s to return it</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Wir können für f einfach die “Identity”-Monade nehmen, die wir nachher wegcasten<br>
können.</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="kw">newtype</span> <span class="dt">Identity</span> a <span class="ot">=</span> <span class="dt">Identity</span> a</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="kw">newtype</span> <span class="dt">Identity</span> a <span class="ot">=</span> <span class="dt">Identity</span> a</span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="co">-- Id :: a -&gt; Identity a</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="ot">runIdentity ::</span> <span class="dt">Identity</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a>runIdentity (<span class="dt">Identity</span> x) <span class="ot">=</span> x</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Functor</span> <span class="dt">Identity</span> <span class="kw">where</span></span>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">fmap</span> f (<span class="dt">Identity</span> x) <span class="ot">=</span> <span class="dt">Identity</span> (f x)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">fmap</span> f (<span class="dt">Identity</span> x) <span class="ot">=</span> <span class="dt">Identity</span> (f x)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>somit ist set einfach nur</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a>set ln x s</span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> runIdentity (ls set_fld s)</span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">where</span></span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a><span class="ot"> set_fld ::</span> a <span class="ot">-&gt;</span> <span class="dt">Identity</span> a</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> set_fld _ <span class="ot">=</span> <span class="dt">Identity</span> x</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="co">-- a was the OLD value.</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="co">-- We throw that away and set the new value</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="co">-- We throw that away and set the new value</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>oder kürzer (für nerds wie den Author der Lens-Lib)</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a>set ln x <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> <span class="fu">const</span> x)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ot">set ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s)</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a>set ln x <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> <span class="fu">const</span> x)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="benutzen-einer-lens-also-modify" class="level2">
<h2 class="anchored" data-anchor-id="benutzen-einer-lens-also-modify">Benutzen einer Lens also Modify</h2>
<p>Dasselbe wie Set, nur dass wir den Parameter nicht entsorgen, sondern in die<br>
mitgelieferte Function stopfen.</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>over ln f <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> f)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>over ln f <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> f)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="benutzen-einer-lens-also-getter" class="level2">
<h2 class="anchored" data-anchor-id="benutzen-einer-lens-also-getter">Benutzen einer Lens also Getter</h2>
<div class="sourceCode" id="cb15"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>view ln s <span class="ot">=</span> <span class="op">--...</span>umm<span class="op">...</span></span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="op">--:</span>t ln <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- =&gt; get a out of the (f s) return-value</span></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="co">-- Wait, WHAT?</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="co">-- Wait, WHAT?</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Auch hier gibt es einen netten Funktor. Wir packen das “a” einfach in das “f”<br>
und werfen das “s” am End weg.</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="kw">newtype</span> <span class="dt">Const</span> v a <span class="ot">=</span> <span class="dt">Const</span> v</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="kw">newtype</span> <span class="dt">Const</span> v a <span class="ot">=</span> <span class="dt">Const</span> v</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a><span class="ot">getConst ::</span> <span class="dt">Const</span> v a <span class="ot">-&gt;</span> v</span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a>getConst (<span class="dt">Const</span> x) <span class="ot">=</span> x</span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Functor</span> (<span class="dt">Const</span> v) <span class="kw">where</span></span>
<span id="cb16-7"><a href="#cb16-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">fmap</span> f (<span class="dt">Const</span> x) <span class="ot">=</span> <span class="dt">Const</span> x</span>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a> <span class="co">-- throw f away. Nothing changes our const!</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb16-8"><a href="#cb16-8" aria-hidden="true" tabindex="-1"></a> <span class="co">-- throw f away. Nothing changes our const!</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>somit ergibt sich</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>view ln s</span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> getConst (ln <span class="dt">Const</span> s)</span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> <span class="co">-- Const :: s -&gt; Const a s</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> <span class="co">-- Const :: s -&gt; Const a s</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>oder nerdig</p>
<div class="sourceCode" id="cb18"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>view ln <span class="ot">=</span> getConst <span class="op">.</span> ln <span class="dt">Const</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ot">view ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> a)</span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>view ln <span class="ot">=</span> getConst <span class="op">.</span> ln <span class="dt">Const</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="lenses-bauen" class="level2">
<h2 class="anchored" data-anchor-id="lenses-bauen">Lenses bauen</h2>
<p>Nochmal kurz der Typ:</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f s</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Für unser Personen-Beispiel vom Anfang:</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span>,<span class="ot"> _salary ::</span> <span class="dt">Int</span> }</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span>,<span class="ot"> _salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a><span class="ot">name ::</span> <span class="dt">Lens'</span> <span class="dt">Person</span> <span class="dt">String</span></span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- name :: Functor f =&gt; (String -&gt; f String)</span></span>
@ -879,15 +884,15 @@ und werfen das “s” am End weg.</p>
<span id="cb20-8"><a href="#cb20-8" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="fu">fmap</span> (\n' <span class="ot">-&gt;</span> <span class="dt">P</span> n' s) (elt_fn n)</span>
<span id="cb20-9"><a href="#cb20-9" aria-hidden="true" tabindex="-1"></a><span class="co">-- fmap :: Functor f =&gt; (a-&gt;b) -&gt; f a -&gt; f b - der Funktor, der alles verknüpft</span></span>
<span id="cb20-10"><a href="#cb20-10" aria-hidden="true" tabindex="-1"></a><span class="co">-- \n' -&gt; .. :: String -&gt; Person - Funktion um das Element zu lokalisieren (WO wird ersetzt/gelesen/...)</span></span>
<span id="cb20-11"><a href="#cb20-11" aria-hidden="true" tabindex="-1"></a><span class="co">-- elt_fn n :: f String - Funktion um das Element zu verändern (setzen, ändern, ...)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb20-11"><a href="#cb20-11" aria-hidden="true" tabindex="-1"></a><span class="co">-- elt_fn n :: f String - Funktion um das Element zu verändern (setzen, ändern, ...)</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Die Lambda-Funktion ersetzt einfach den Namen. Häufig sieht man auch</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>name elt_fn (<span class="dt">P</span> n s)</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>name elt_fn (<span class="dt">P</span> n s)</span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> (\n' <span class="ot">-&gt;</span> <span class="dt">P</span> n' s) <span class="op">&lt;$&gt;</span> (elt_fn n)</span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a><span class="co">-- | Focus | |Function|</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a><span class="co">-- | Focus | |Function|</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="wie-funktioniert-das-intern" class="level2">
<h2 class="anchored" data-anchor-id="wie-funktioniert-das-intern">Wie funktioniert das intern?</h2>
<div class="sourceCode" id="cb22"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>view name (<span class="dt">P</span> {_name<span class="ot">=</span><span class="st">"Fred"</span>, _salary<span class="ot">=</span><span class="dv">100</span>})</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>view name (<span class="dt">P</span> {_name<span class="ot">=</span><span class="st">"Fred"</span>, _salary<span class="ot">=</span><span class="dv">100</span>})</span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a> <span class="co">-- inline view-function</span></span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a><span class="ot">=</span> getConst (name <span class="dt">Const</span> (<span class="dt">P</span> {_name<span class="ot">=</span><span class="st">"Fred"</span>, _salary<span class="ot">=</span><span class="dv">100</span>})</span>
<span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a> <span class="co">-- inline name</span></span>
@ -895,7 +900,7 @@ und werfen das “s” am End weg.</p>
<span id="cb22-6"><a href="#cb22-6" aria-hidden="true" tabindex="-1"></a> <span class="co">-- fmap f (Const x) = Const x - Definition von Const</span></span>
<span id="cb22-7"><a href="#cb22-7" aria-hidden="true" tabindex="-1"></a><span class="ot">=</span> getConst (<span class="dt">Const</span> <span class="st">"Fred"</span>)</span>
<span id="cb22-8"><a href="#cb22-8" aria-hidden="true" tabindex="-1"></a> <span class="co">-- getConst (Const x) = x</span></span>
<span id="cb22-9"><a href="#cb22-9" aria-hidden="true" tabindex="-1"></a><span class="ot">=</span> <span class="st">"Fred"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb22-9"><a href="#cb22-9" aria-hidden="true" tabindex="-1"></a><span class="ot">=</span> <span class="st">"Fred"</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Dieser Aufruf hat KEINE Runtime-Kosten, weil der Compiler direkt die Address des<br>
Feldes einsetzen kann. Der gesamte Boilerplate-Code wird vom Compiler<br>
wegoptimiert.</p>
@ -923,15 +928,15 @@ Somit ist Lens-Composition einfach nur Function-Composition (.).</p>
<section id="automatisieren-mit-template-haskell" class="level2">
<h2 class="anchored" data-anchor-id="automatisieren-mit-template-haskell">Automatisieren mit Template-Haskell</h2>
<p>Der Code um die Lenses zu bauen ist für records immer Identisch:</p>
<div class="sourceCode" id="cb23"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span>,<span class="ot"> _salary ::</span> <span class="dt">Int</span> }</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span>,<span class="ot"> _salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a><span class="ot">name ::</span> <span class="dt">Lens'</span> <span class="dt">Person</span> <span class="dt">String</span></span>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a>name elt_fn (<span class="dt">P</span> n s) <span class="ot">=</span> (\n' <span class="ot">-&gt;</span> <span class="dt">P</span> n' s) <span class="op">&lt;$&gt;</span> (elt_fn n)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a>name elt_fn (<span class="dt">P</span> n s) <span class="ot">=</span> (\n' <span class="ot">-&gt;</span> <span class="dt">P</span> n' s) <span class="op">&lt;$&gt;</span> (elt_fn n)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Daher kann man einfach</p>
<div class="sourceCode" id="cb24"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Control.Lens.TH</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Control.Lens.TH</span></span>
<span id="cb24-2"><a href="#cb24-2" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span>,<span class="ot"> _salary ::</span> <span class="dt">Int</span> }</span>
<span id="cb24-3"><a href="#cb24-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb24-4"><a href="#cb24-4" aria-hidden="true" tabindex="-1"></a><span class="op">$</span>(makeLenses '<span class="dt">'Person</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb24-4"><a href="#cb24-4" aria-hidden="true" tabindex="-1"></a><span class="op">$</span>(makeLenses '<span class="dt">'Person</span>)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>nehmen, was einem eine Lens für “name” und eine Lens für “salary” generiert.<br>
Mit anderen Templates kann man auch weitere Dinge steuern (etwa wofür Lenses<br>
generiert werden, welches Prefix (statt _) man haben will etc. pp.).</p>
@ -939,7 +944,7 @@ generiert werden, welches Prefix (statt _) man haben will etc. pp.).</p>
</section>
<section id="lenses-für-den-beispielcode" class="level2">
<h2 class="anchored" data-anchor-id="lenses-für-den-beispielcode">Lenses für den Beispielcode</h2>
<div class="sourceCode" id="cb25"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Control.Lens.TH</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="kw">import</span> <span class="dt">Control.Lens.TH</span></span>
<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Person</span> <span class="ot">=</span> <span class="dt">P</span> {<span class="ot"> _name ::</span> <span class="dt">String</span></span>
<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> _addr ::</span> <span class="dt">Address</span></span>
@ -952,11 +957,11 @@ generiert werden, welches Prefix (statt _) man haben will etc. pp.).</p>
<span id="cb25-11"><a href="#cb25-11" aria-hidden="true" tabindex="-1"></a><span class="op">$</span>(makeLenses '<span class="dt">'Address</span>)</span>
<span id="cb25-12"><a href="#cb25-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb25-13"><a href="#cb25-13" aria-hidden="true" tabindex="-1"></a><span class="ot">setPostcode ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Person</span> <span class="ot">-&gt;</span> <span class="dt">Person</span></span>
<span id="cb25-14"><a href="#cb25-14" aria-hidden="true" tabindex="-1"></a>setPostcode pc p <span class="ot">=</span> set (addr <span class="op">.</span> postcode) pc p</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb25-14"><a href="#cb25-14" aria-hidden="true" tabindex="-1"></a>setPostcode pc p <span class="ot">=</span> set (addr <span class="op">.</span> postcode) pc p</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="shortcuts-mit-line-noise" class="level2">
<h2 class="anchored" data-anchor-id="shortcuts-mit-line-noise">Shortcuts mit “Line-Noise”</h2>
<div class="sourceCode" id="cb26"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- ...</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- ...</span></span>
<span id="cb26-2"><a href="#cb26-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb26-3"><a href="#cb26-3" aria-hidden="true" tabindex="-1"></a><span class="ot">setPostcode ::</span> <span class="dt">String</span> <span class="ot">-&gt;</span> <span class="dt">Person</span> <span class="ot">-&gt;</span> <span class="dt">Person</span></span>
<span id="cb26-4"><a href="#cb26-4" aria-hidden="true" tabindex="-1"></a>setPostcode pc p <span class="ot">=</span> addr <span class="op">.</span> postcode <span class="op">.~</span> pc <span class="op">$</span> p</span>
@ -964,7 +969,7 @@ generiert werden, welches Prefix (statt _) man haben will etc. pp.).</p>
<span id="cb26-6"><a href="#cb26-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb26-7"><a href="#cb26-7" aria-hidden="true" tabindex="-1"></a><span class="ot">getPostcode ::</span> <span class="dt">Person</span> <span class="ot">-&gt;</span> <span class="dt">String</span></span>
<span id="cb26-8"><a href="#cb26-8" aria-hidden="true" tabindex="-1"></a>getPostcode p <span class="ot">=</span> p <span class="op">^.</span> <span class="op">$</span> addr <span class="op">.</span> postcode</span>
<span id="cb26-9"><a href="#cb26-9" aria-hidden="true" tabindex="-1"></a><span class="co">-- |from|get| Focus |</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb26-9"><a href="#cb26-9" aria-hidden="true" tabindex="-1"></a><span class="co">-- |from|get| Focus |</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Es gibt drölf-zillionen weitere Infix-Operatoren (für Folds,<br>
Listenkonvertierungen, -traversierungen, …)</p>
</section>
@ -972,7 +977,7 @@ Listenkonvertierungen, -traversierungen, …)</p>
<h2 class="anchored" data-anchor-id="virtuelle-felder">Virtuelle Felder</h2>
<p>Man kann mit Lenses sogar Felder emulieren, die gar nicht da sind. Angenommen<br>
folgender Code:</p>
<div class="sourceCode" id="cb27"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Temp</span> <span class="ot">=</span> <span class="dt">T</span> {<span class="ot"> _fahrenheit ::</span> <span class="dt">Float</span> }</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Temp</span> <span class="ot">=</span> <span class="dt">T</span> {<span class="ot"> _fahrenheit ::</span> <span class="dt">Float</span> }</span>
<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb27-3"><a href="#cb27-3" aria-hidden="true" tabindex="-1"></a><span class="op">$</span>(makeLenses '<span class="dt">'Temp</span>)</span>
<span id="cb27-4"><a href="#cb27-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- liefert Lens: fahrenheit :: Lens Temp Float</span></span>
@ -981,7 +986,7 @@ folgender Code:</p>
<span id="cb27-7"><a href="#cb27-7" aria-hidden="true" tabindex="-1"></a>centigrade centi_fn (<span class="dt">T</span> faren)</span>
<span id="cb27-8"><a href="#cb27-8" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> (\centi' <span class="ot">-&gt;</span> <span class="dt">T</span> (cToF centi'))</span>
<span id="cb27-9"><a href="#cb27-9" aria-hidden="true" tabindex="-1"></a> <span class="op">&lt;$&gt;</span> (centi_fn (fToC faren))</span>
<span id="cb27-10"><a href="#cb27-10" aria-hidden="true" tabindex="-1"></a><span class="co">-- cToF &amp; fToC as Converter-Functions defined someplace else</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb27-10"><a href="#cb27-10" aria-hidden="true" tabindex="-1"></a><span class="co">-- cToF &amp; fToC as Converter-Functions defined someplace else</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Hiermit kann man dann auch Funktionen, die auf Grad-Celsius rechnen auf Daten<br>
anwenden, die eigenlich nur Fahrenheit speichern, aber eine Umrechnung<br>
bereitstellen. Analog kann man auch einen Zeit-Datentypen definieren, der<br>
@ -992,7 +997,7 @@ Minuten oder 37 Stunden ist)</p>
<h2 class="anchored" data-anchor-id="non-record-strukturen">Non-Record Strukturen</h2>
<p>Das ganze kann man auch parametrisieren und auf Non-Record-Strukturen anwenden.<br>
Beispielhaft an einer Map verdeutlicht:</p>
<div class="sourceCode" id="cb28"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- from Data.Lens.At</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- from Data.Lens.At</span></span>
<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a><span class="ot">at ::</span> <span class="dt">Ord</span> k <span class="ot">=&gt;</span> k <span class="ot">-&gt;</span> <span class="dt">Lens'</span> (<span class="dt">Map</span> k v) (<span class="dt">Maybe</span> v)</span>
<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- oder identisch, wenn man die Lens' auflöst:</span></span>
@ -1009,18 +1014,18 @@ Beispielhaft an einer Map verdeutlicht:</p>
<span id="cb28-15"><a href="#cb28-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">Nothing</span> <span class="ot">-&gt;</span> m</span>
<span id="cb28-16"><a href="#cb28-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">Just</span> _ <span class="ot">-&gt;</span> Map.delete k m</span>
<span id="cb28-17"><a href="#cb28-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb28-18"><a href="#cb28-18" aria-hidden="true" tabindex="-1"></a><span class="co">-- mb_fn :: Maybe v -&gt; f Maybe v</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb28-18"><a href="#cb28-18" aria-hidden="true" tabindex="-1"></a><span class="co">-- mb_fn :: Maybe v -&gt; f Maybe v</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="weitere-beispiele" class="level2">
<h2 class="anchored" data-anchor-id="weitere-beispiele">Weitere Beispiele</h2>
<ul>
<li><p>Bitfields auf Strukturen die Bits haben (Ints, …) in Data.Bits.Lens</p></li>
<li><p>Web-scraper in Package hexpat-lens</p>
<div class="sourceCode" id="cb29"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a>p <span class="op">^..</span> _HTML' <span class="op">.</span> to allNodes</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true" tabindex="-1"></a>p <span class="op">^..</span> _HTML' <span class="op">.</span> to allNodes</span>
<span id="cb29-2"><a href="#cb29-2" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span> <span class="fu">traverse</span> <span class="op">.</span> named <span class="st">"a"</span></span>
<span id="cb29-3"><a href="#cb29-3" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span> <span class="fu">traverse</span> <span class="op">.</span> ix <span class="st">"href"</span></span>
<span id="cb29-4"><a href="#cb29-4" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span> filtered isLocal</span>
<span id="cb29-5"><a href="#cb29-5" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span> to trimSpaces</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb29-5"><a href="#cb29-5" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span> to trimSpaces</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Zieht alle externen Links aus dem gegebenen HTML-Code in p um weitere ziele<br>
fürs crawlen zu finden.</p></li>
</ul>
@ -1029,36 +1034,36 @@ fürs crawlen zu finden.</p></li>
<h2 class="anchored" data-anchor-id="erweiterungen">Erweiterungen</h2>
<p>Bisher hatten wir Lenses nur auf Funktoren F. Die nächstmächtigere Klasse ist<br>
Applicative.</p>
<div class="sourceCode" id="cb30"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Traversal'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Applicative</span> f</span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> f s)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Traversal'</span> s a <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Applicative</span> f</span>
<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a> <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f a) <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> f s)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Da wir den Container identisch lassen (weder s noch a wurde angefasst) muss sich<br>
etwas anderes ändern. Statt eines einzelnen Focus erhalten wir viele Foci.</p>
<p>Was ist ein Applicative überhaupt? Eine schwächere Monade (nur 1x Anwendung und<br>
kein Bind - dafür kann man die beliebig oft hintereinanderhängen).</p>
<div class="sourceCode" id="cb31"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> <span class="dt">Applicative</span> f <span class="kw">where</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="kw">class</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> <span class="dt">Applicative</span> f <span class="kw">where</span></span>
<span id="cb31-2"><a href="#cb31-2" aria-hidden="true" tabindex="-1"></a><span class="ot"> pure ::</span> a <span class="ot">-&gt;</span> f a</span>
<span id="cb31-3"><a href="#cb31-3" aria-hidden="true" tabindex="-1"></a><span class="ot"> (&lt;*&gt;) ::</span> f (a <span class="ot">-&gt;</span> b) <span class="ot">-&gt;</span> f a <span class="ot">-&gt;</span> f b</span>
<span id="cb31-4"><a href="#cb31-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb31-5"><a href="#cb31-5" aria-hidden="true" tabindex="-1"></a><span class="co">-- Monade als Applicative:</span></span>
<span id="cb31-6"><a href="#cb31-6" aria-hidden="true" tabindex="-1"></a><span class="fu">pure</span> <span class="ot">=</span> <span class="fu">return</span></span>
<span id="cb31-7"><a href="#cb31-7" aria-hidden="true" tabindex="-1"></a>mf <span class="op">&lt;*&gt;</span> mx <span class="ot">=</span> <span class="kw">do</span> { f <span class="ot">&lt;-</span> mf; x <span class="ot">&lt;-</span> mx; <span class="fu">return</span> (f x) }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb31-7"><a href="#cb31-7" aria-hidden="true" tabindex="-1"></a>mf <span class="op">&lt;*&gt;</span> mx <span class="ot">=</span> <span class="kw">do</span> { f <span class="ot">&lt;-</span> mf; x <span class="ot">&lt;-</span> mx; <span class="fu">return</span> (f x) }</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Recap: Was macht eine Lens:</p>
<div class="sourceCode" id="cb32"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Adress</span> <span class="ot">=</span> <span class="dt">A</span> {<span class="ot"> _road ::</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> <span class="dt">Adress</span> <span class="ot">=</span> <span class="dt">A</span> {<span class="ot"> _road ::</span> <span class="dt">String</span></span>
<span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> _city ::</span> <span class="dt">String</span></span>
<span id="cb32-3"><a href="#cb32-3" aria-hidden="true" tabindex="-1"></a> ,<span class="ot"> _postcode ::</span> <span class="dt">String</span> }</span>
<span id="cb32-4"><a href="#cb32-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb32-5"><a href="#cb32-5" aria-hidden="true" tabindex="-1"></a><span class="ot">road ::</span> <span class="dt">Lens'</span> <span class="dt">Adress</span> <span class="dt">String</span></span>
<span id="cb32-6"><a href="#cb32-6" aria-hidden="true" tabindex="-1"></a>road elt_fn (<span class="dt">A</span> r c p) <span class="ot">=</span> (\r' <span class="ot">-&gt;</span> <span class="dt">A</span> r' c p) <span class="op">&lt;$&gt;</span> (elt_fn r)</span>
<span id="cb32-7"><a href="#cb32-7" aria-hidden="true" tabindex="-1"></a><span class="co">-- | "Hole" | | Thing to put in|</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb32-7"><a href="#cb32-7" aria-hidden="true" tabindex="-1"></a><span class="co">-- | "Hole" | | Thing to put in|</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Wenn man nun road &amp; city gleichzeitig bearbeiten will:</p>
<div class="sourceCode" id="cb33"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="ot">addr_strs ::</span> <span class="dt">Traversal'</span> <span class="dt">Address</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="ot">addr_strs ::</span> <span class="dt">Traversal'</span> <span class="dt">Address</span> <span class="dt">String</span></span>
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a>addr_strs elt_fn (<span class="dt">A</span> r c p)</span>
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="op">...</span> (\r' c' <span class="ot">-&gt;</span> <span class="dt">A</span> r' c' p) <span class="op">..</span> (elt_fn r) <span class="op">..</span> (elt_fn c) <span class="op">..</span></span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- | function with 2 "Holes"| first Thing | second Thing</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- | function with 2 "Holes"| first Thing | second Thing</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>fmap kann nur 1 Loch stopfen, aber nicht mit n Löchern umgehen. Applicative mit<br>
&lt;*&gt; kann das.<br>
Somit gibt sich</p>
<div class="sourceCode" id="cb34"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ot">addr_strs ::</span> <span class="dt">Traversal'</span> <span class="dt">Address</span> <span class="dt">String</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="ot">addr_strs ::</span> <span class="dt">Traversal'</span> <span class="dt">Address</span> <span class="dt">String</span></span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a>addr_strs elt_fn (<span class="dt">A</span> r c p)</span>
<span id="cb34-3"><a href="#cb34-3" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> <span class="fu">pure</span> (\r' c' <span class="ot">-&gt;</span> <span class="dt">A</span> r' c' p) <span class="op">&lt;*&gt;</span> (elt_fn r) <span class="op">&lt;*&gt;</span> (elt_fn c)</span>
<span id="cb34-4"><a href="#cb34-4" aria-hidden="true" tabindex="-1"></a><span class="co">-- lift in Appl. | function with 2 "Holes"| first Thing | second Thing</span></span>
@ -1066,13 +1071,13 @@ Somit gibt sich</p>
<span id="cb34-6"><a href="#cb34-6" aria-hidden="true" tabindex="-1"></a><span class="ot">addr_strs ::</span> <span class="dt">Traversal'</span> <span class="dt">Address</span> <span class="dt">String</span></span>
<span id="cb34-7"><a href="#cb34-7" aria-hidden="true" tabindex="-1"></a>addr_strs elt_fn (<span class="dt">A</span> r c p)</span>
<span id="cb34-8"><a href="#cb34-8" aria-hidden="true" tabindex="-1"></a> <span class="ot">=</span> (\r' c' <span class="ot">-&gt;</span> <span class="dt">A</span> r' c' p) <span class="op">&lt;$&gt;</span> (elt_fn r) <span class="op">&lt;*&gt;</span> (elt_fn c)</span>
<span id="cb34-9"><a href="#cb34-9" aria-hidden="true" tabindex="-1"></a><span class="co">-- pure x &lt;*&gt; y == x &lt;$&gt; y</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb34-9"><a href="#cb34-9" aria-hidden="true" tabindex="-1"></a><span class="co">-- pure x &lt;*&gt; y == x &lt;$&gt; y</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Wie würd eine modify-funktion aussehen?</p>
<div class="sourceCode" id="cb35"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">Lens'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb35-2"><a href="#cb35-2" aria-hidden="true" tabindex="-1"></a>over ln f <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> f)</span>
<span id="cb35-3"><a href="#cb35-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb35-4"><a href="#cb35-4" aria-hidden="true" tabindex="-1"></a><span class="ot">over ::</span> <span class="dt">Traversal'</span> s a <span class="ot">-&gt;</span> (a <span class="ot">-&gt;</span> a) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> s</span>
<span id="cb35-5"><a href="#cb35-5" aria-hidden="true" tabindex="-1"></a>over ln f <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> f)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb35-5"><a href="#cb35-5" aria-hidden="true" tabindex="-1"></a>over ln f <span class="ot">=</span> runIdentity <span class="op">.</span> ln (<span class="dt">Identity</span> <span class="op">.</span> f)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Der Code ist derselbe - nur der Typ ist generischer. Auch die anderen Dinge<br>
funktioniert diese Erweiterung (für Identity und Const muss man noch ein paar<br>
dummy-Instanzen schreiben um sie von Functor auf Applicative oder Monad zu heben</p>
@ -1097,22 +1102,22 @@ steuern. Beispisweise eine Function anwenden auf</p>
<h2 class="anchored" data-anchor-id="wie-es-in-lens-wirklich-aussieht">Wie es in Lens wirklich aussieht</h2>
<p>In diesem Artikel wurde nur auf Monomorphic Lenses eingegangen. In der richtigen<br>
Library ist eine Lens</p>
<div class="sourceCode" id="cb36"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="dt">Lens</span> s s a a</span>
<span id="cb36-2"><a href="#cb36-2" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens</span> s t a b <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f b) <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> f t)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens'</span> s a <span class="ot">=</span> <span class="dt">Lens</span> s s a a</span>
<span id="cb36-2"><a href="#cb36-2" aria-hidden="true" tabindex="-1"></a><span class="kw">type</span> <span class="dt">Lens</span> s t a b <span class="ot">=</span> <span class="kw">forall</span> f<span class="op">.</span> <span class="dt">Functor</span> f <span class="ot">=&gt;</span> (a <span class="ot">-&gt;</span> f b) <span class="ot">-&gt;</span> (s <span class="ot">-&gt;</span> f t)</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>sodass sich auch die Typen ändern können um z.B. automatisch einen Konvertierten<br>
(sicheren) Typen aus einer unsicheren Datenstruktur zu geben.</p>
<p>Die modify-Funktion over ist auch</p>
<div class="sourceCode" id="cb37"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;</span><span class="ot"> over ::</span> <span class="dt">Profunctor</span> p <span class="ot">=&gt;</span> <span class="dt">Setting</span> p s t a b <span class="ot">-&gt;</span> p a b <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> t</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="op">&gt;</span><span class="ot"> over ::</span> <span class="dt">Profunctor</span> p <span class="ot">=&gt;</span> <span class="dt">Setting</span> p s t a b <span class="ot">-&gt;</span> p a b <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> t</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<blockquote class="blockquote">
<p><em>Edward is deeply in thrall to abstractionitis</em> - Simon Peyton Jones</p>
</blockquote>
<p>Lens alleine definiert 39 newtypes, 34 data-types und 194 Typsynonyme…<br>
Ausschnitt</p>
<div class="sourceCode" id="cb38"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- traverseOf :: Functor f =&gt; Iso s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true" tabindex="-1"></a><span class="co">-- traverseOf :: Functor f =&gt; Iso s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</span></span>
<span id="cb38-2"><a href="#cb38-2" aria-hidden="true" tabindex="-1"></a><span class="co">-- traverseOf :: Functor f =&gt; Lens s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</span></span>
<span id="cb38-3"><a href="#cb38-3" aria-hidden="true" tabindex="-1"></a><span class="co">-- traverseOf :: Applicative f =&gt; Traversal s t a b -&gt; (a -&gt; f b) -&gt; s -&gt; f t</span></span>
<span id="cb38-4"><a href="#cb38-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb38-5"><a href="#cb38-5" aria-hidden="true" tabindex="-1"></a><span class="ot">traverseOf ::</span> <span class="dt">Over</span> p f s t a b <span class="ot">-&gt;</span> p a (f b) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f t</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb38-5"><a href="#cb38-5" aria-hidden="true" tabindex="-1"></a><span class="ot">traverseOf ::</span> <span class="dt">Over</span> p f s t a b <span class="ot">-&gt;</span> p a (f b) <span class="ot">-&gt;</span> s <span class="ot">-&gt;</span> f t</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>dafuq?</p>
@ -1133,7 +1138,7 @@ Ausschnitt</p>
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../../">
<script src="../../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -131,7 +133,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -164,7 +166,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -204,7 +206,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -232,7 +234,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -255,17 +257,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -276,7 +281,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -288,6 +293,8 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -299,12 +306,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -342,6 +349,10 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -385,12 +396,6 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<a href="../../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -651,7 +656,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<p>Wie man das verwendet, siehe <a href="../../../Coding/Haskell/Webapp-Example/index.html">Webapp-Example</a>.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE FlexibleContexts #-}</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE LambdaCase #-}</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE OverloadedStrings #-}</span></span>
@ -831,7 +836,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb1-178"><a href="#cb1-178" aria-hidden="true" tabindex="-1"></a> out _ r status _ _ payload _</span>
<span id="cb1-179"><a href="#cb1-179" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> statusCode status <span class="op">&lt;</span> <span class="dv">300</span> <span class="ot">=</span> <span class="st">""</span></span>
<span id="cb1-180"><a href="#cb1-180" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> statusCode status <span class="op">&gt;</span> <span class="dv">399</span> <span class="op">&amp;&amp;</span> statusCode status <span class="op">&lt;</span> <span class="dv">500</span> <span class="ot">=</span> <span class="st">"Error code "</span><span class="op">&lt;&gt;</span>toLogStr (statusCode status) <span class="op">&lt;&gt;</span><span class="st">" sent. Request-Payload was: "</span><span class="op">&lt;&gt;</span> <span class="fu">mconcat</span> (toLogStr <span class="op">&lt;$&gt;</span> payload) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span>
<span id="cb1-181"><a href="#cb1-181" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> <span class="fu">otherwise</span> <span class="ot">=</span> toLogStr (<span class="fu">show</span> r) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-181"><a href="#cb1-181" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> <span class="fu">otherwise</span> <span class="ot">=</span> toLogStr (<span class="fu">show</span> r) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@ -850,7 +855,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../../">
<script src="../../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -131,7 +133,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -164,7 +166,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -204,7 +206,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -232,7 +234,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -255,17 +257,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -276,7 +281,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -288,6 +293,8 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -299,12 +306,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -342,6 +349,10 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -385,12 +396,6 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<a href="../../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -651,7 +656,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<p>Anleitung siehe <a href="../../../Coding/Haskell/Webapp-Example/index.html">Webapp-Example</a>.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-orphans #-}</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-orphans #-}</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveAnyClass #-}</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveFunctor #-}</span></span>
@ -727,7 +732,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb1-74"><a href="#cb1-74" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-75"><a href="#cb1-75" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-76"><a href="#cb1-76" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Out</span> <span class="dt">Response</span></span>
<span id="cb1-77"><a href="#cb1-77" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">FromBSON</span> <span class="dt">Repsonse</span> <span class="co">-- FromBSON-Instanz geht immer davon aus, dass alle keys da sind (ggf. mit null bei Nothing).</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-77"><a href="#cb1-77" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">FromBSON</span> <span class="dt">Repsonse</span> <span class="co">-- FromBSON-Instanz geht immer davon aus, dass alle keys da sind (ggf. mit null bei Nothing).</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
@ -746,7 +751,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -68,17 +68,19 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<meta name="quarto:offset" content="../../../">
<script src="../../../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../../../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../../../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../../../site_libs/quarto-html/anchor.min.js"></script>
<link href="../../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../../../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../../../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../../../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../../../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../../../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -131,7 +133,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -164,7 +166,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -204,7 +206,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -232,7 +234,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -255,17 +257,20 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -276,7 +281,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -288,6 +293,8 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../../../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../../../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -299,12 +306,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../../../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../../../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../../../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../../../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -342,6 +349,10 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../../../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -385,12 +396,6 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<a href="../../../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../../../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -687,18 +692,18 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<section id="erstellen-eines-neuen-projektes" class="level3">
<h3 class="anchored" data-anchor-id="erstellen-eines-neuen-projektes">Erstellen eines neuen Projektes</h3>
<p>Zunächst erstellen wir in normales Haskell-Projekt ohne Funktionalität &amp; Firlefanz:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> new myservice</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> new myservice</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Dies erstellt ein neues Verzeichnis und das generelle scaffolding. Nach einer kurzen Anpassung der <code>stack.yaml</code> (resolver auf unserer setzen; aktuell: <code>lts-17.4</code>) fügen wir am Ende der Datei</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">allow-newer</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">allow-newer</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">ghc-options</span><span class="kw">:</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">"$locals"</span><span class="kw">:</span><span class="at"> -fwrite-ide-info</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">"$locals"</span><span class="kw">:</span><span class="at"> -fwrite-ide-info</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>ein. Anschließend organisieren™ wir uns noch eine gute <code>.gitignore</code> und initialisieren das git mittels <code>git init; git add .; git commit -m "initial scaffold"</code></p>
</section>
<section id="generierung-der-api" class="level3">
<h3 class="anchored" data-anchor-id="generierung-der-api">Generierung der API</h3>
<p>Da die API immer wieder neu generiert werden kann (und sollte!) liegt sich in einem unterverzeichnis des Hauptprojektes.</p>
<p>Initial ist es das einfachste ein leeres temporäres Verzeichnis woanders zu erstellen, die <code>api-doc.yml</code> hinein kopieren und folgendes ausführen:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">openapi-generator</span> generate <span class="at">-g</span> haskell <span class="at">-o</span> . <span class="at">-i</span> api-doc.yml</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">openapi-generator</span> generate <span class="at">-g</span> haskell <span class="at">-o</span> . <span class="at">-i</span> api-doc.yml</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Dieses erstellt einem dann eine komplette library inkl. Datentypen. Wichtig: Der Name in der <code>api-doc</code> sollte vom Namen des Services (oben <code>myservice</code>) abweichen - entweder in Casing oder im Namen direkt. Suffixe wie API schneidet der Generator hier leider ab. (Wieso das ganze? Es entstehen nachher 2 libraries, <code>foo</code> &amp; <code>fooAPI</code>. Da der generator das API abschneidet endet man mit foo &amp; foo und der compiler meckert, dass er nicht weiß, welche lib gemeint ist).</p>
<p>danach: wie gewohnt <code>git init; git add .; git commit -m "initial"</code>. Auf dem Server der Wahl (github, gitea, gitlab, …) nun ein Repository erstellen (am Besten: <code>myserviceAPI</code> - nach Konvention ist alles auf API endend autogeneriert!) und den Anweisungen nach ein remote hinzufügen &amp; pushen.</p>
<section id="wieder-zurück-im-haskell-service" class="level4">
@ -706,32 +711,32 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<p>In unserem eigentlichen Service müssen wir nun die API einbinden. Dazu erstellen wir ein Verzeichnis <code>libs</code> (Konvention) und machen ein <code>git submodule add &lt;repository-url&gt; libs/myserviceAPI</code></p>
<p>Git hat nun die API in das submodul gepackt und wir können das oben erstellte temporäre Verzeichnis wieder löschen.</p>
<p>Anschließend müssen wir stack noch erklären, dass wir die API da nun liegen haben und passen wieder die <code>stack.yaml</code> an, indem wir das Verzeichnis unter packages hinzufügen.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">packages</span><span class="kw">:</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">packages</span><span class="kw">:</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> .</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> libs/myserviceAPI</span><span class="co"> # &lt;&lt;</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> libs/myserviceAPI</span><span class="co"> # &lt;&lt;</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Nun können wir in der <code>package.yaml</code> (oder <code>myservice.cabal</code>, falls kein <code>hpack</code> verwendet wird) unter den dependencies unsere API hinzufügen (name wie die cabal-Datei in <code>libs/myserviceAPI</code>).</p>
</section>
</section>
<section id="einbinden-anderer-microservices" class="level3">
<h3 class="anchored" data-anchor-id="einbinden-anderer-microservices">Einbinden anderer Microservices</h3>
<p>Funktioniert komplett analog zu dem vorgehen oben (ohne das generieren natürlich :grin:). <code>stack.yaml</code> editieren und zu den packages hinzufügen:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">packages</span><span class="kw">:</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">packages</span><span class="kw">:</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> .</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> libs/myserviceAPI</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> libs/myCoolMLServiceAPI</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> libs/myCoolMLServiceAPI</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>in der <code>package.yaml</code> (oder der cabal) die dependencies hinzufügen und schon haben wir die Features zur Verfügung und können gegen diese Services reden.</p>
</section>
<section id="entfernen-von-anderen-technologienmicroservices" class="level3">
<h3 class="anchored" data-anchor-id="entfernen-von-anderen-technologienmicroservices">Entfernen von anderen Technologien/Microservices</h3>
<p>In git ist das entfernen von Submodules etwas frickelig, daher hier ein copy&amp;paste der <a href="https://gist.github.com/myusuf3/7f645819ded92bda6677">GitHub-Antwort</a>:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="co">## Remove the submodule entry from .git/config</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="co">## Remove the submodule entry from .git/config</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> submodule deinit <span class="at">-f</span> path/to/submodule</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="co">## Remove the submodule directory from the superproject's .git/modules directory</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="ex">rm-rf</span> .git/modules/path/to/submodule</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="co">## Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> rm-f path/to/submodule</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> rm-f path/to/submodule</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Falls das nicht klappt, gibt es alternative Vorschläge unter dem Link oben.</p>
</section>
<section id="woher-weiss-ich-was-wo-liegt-dokumentation-halloo" class="level3">
@ -743,9 +748,9 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<li><code>...../index.html</code> - hier sind nur die direkten dependencies aufgeführt.</li>
</ul>
<p>Wenn man einen lokalen Webserver startet kann man mittels “s” auch die interaktive Suche öffnen (Suche nach Typen, Funktionen, Signaturen, etc.). In Bash mit <code>python3</code> geht das z.b. einfach über:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> <span class="va">$(</span><span class="ex">stack</span> path <span class="at">--local-doc-root</span><span class="va">)</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> <span class="va">$(</span><span class="ex">stack</span> path <span class="at">--local-doc-root</span><span class="va">)</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">python3</span> <span class="at">-m</span> SimpleHTTPServer 8000</span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">firefox</span> <span class="st">"http://localhost:8000"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="ex">firefox</span> <span class="st">"http://localhost:8000"</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</section>
<section id="implementation-des-services-und-start" class="level3">
<h3 class="anchored" data-anchor-id="implementation-des-services-und-start">Implementation des Services und Start</h3>
@ -759,7 +764,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
</ul>
<p>Für die Main kann man prinzipiell eine Main andere Services copy/pasten. Im folgenden eine Annotierte main-Funktion - zu den einzelnen Voraussetzungen kommen wir im Anschluss.</p>
<p></p><p></p><details><summary>Main.hs anzeigen</summary><blockquote class="blockquote"><p></p>
<div class="sourceCode" id="cb8" data-code-fold="true" data-code-summary="Code anzeigen"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" data-code-fold="true" data-code-summary="Code anzeigen"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE FlexibleContexts #-}</span></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE LambdaCase #-}</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE OverloadedStrings #-}</span></span>
@ -939,7 +944,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb8-178"><a href="#cb8-178" aria-hidden="true" tabindex="-1"></a> out _ r status _ _ payload _</span>
<span id="cb8-179"><a href="#cb8-179" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> statusCode status <span class="op">&lt;</span> <span class="dv">300</span> <span class="ot">=</span> <span class="st">""</span></span>
<span id="cb8-180"><a href="#cb8-180" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> statusCode status <span class="op">&gt;</span> <span class="dv">399</span> <span class="op">&amp;&amp;</span> statusCode status <span class="op">&lt;</span> <span class="dv">500</span> <span class="ot">=</span> <span class="st">"Error code "</span><span class="op">&lt;&gt;</span>toLogStr (statusCode status) <span class="op">&lt;&gt;</span><span class="st">" sent. Request-Payload was: "</span><span class="op">&lt;&gt;</span> <span class="fu">mconcat</span> (toLogStr <span class="op">&lt;$&gt;</span> payload) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span>
<span id="cb8-181"><a href="#cb8-181" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> <span class="fu">otherwise</span> <span class="ot">=</span> toLogStr (<span class="fu">show</span> r) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb8-181"><a href="#cb8-181" aria-hidden="true" tabindex="-1"></a> <span class="op">|</span> <span class="fu">otherwise</span> <span class="ot">=</span> toLogStr (<span class="fu">show</span> r) <span class="op">&lt;&gt;</span> <span class="st">"\n"</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</blockquote></details></section>
<section id="weitere-instanzen-und-definitionen-die-der-generator-noch-nicht-macht" class="level4">
<h4 class="anchored" data-anchor-id="weitere-instanzen-und-definitionen-die-der-generator-noch-nicht-macht">Weitere Instanzen und Definitionen, die der Generator (noch) nicht macht</h4>
@ -969,7 +974,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
</ul></li>
</ul>
<p></p><p></p><details><summary>Types.hs anzeigen</summary><blockquote class="blockquote"><p></p>
<div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-orphans #-}</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-orphans #-}</span></span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# OPTIONS_GHC -Wno-name-shadowing #-}</span></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveAnyClass #-}</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="ot">{-# LANGUAGE DeriveFunctor #-}</span></span>
@ -1045,12 +1050,12 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb9-74"><a href="#cb9-74" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb9-75"><a href="#cb9-75" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb9-76"><a href="#cb9-76" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">Out</span> <span class="dt">Response</span></span>
<span id="cb9-77"><a href="#cb9-77" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">FromBSON</span> <span class="dt">Repsonse</span> <span class="co">-- FromBSON-Instanz geht immer davon aus, dass alle keys da sind (ggf. mit null bei Nothing).</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb9-77"><a href="#cb9-77" aria-hidden="true" tabindex="-1"></a><span class="kw">instance</span> <span class="dt">FromBSON</span> <span class="dt">Repsonse</span> <span class="co">-- FromBSON-Instanz geht immer davon aus, dass alle keys da sind (ggf. mit null bei Nothing).</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
</blockquote></details></section>
<section id="was-noch-zu-tun-ist" class="level4">
<h4 class="anchored" data-anchor-id="was-noch-zu-tun-ist">Was noch zu tun ist</h4>
<p>Den Service implementieren. Einfach ein neues Modul aufmachen (z.B. <code>MyService.Handler</code> oder <code>MyService.DieserEndpunktbereich</code>/<code>MyService.JenerEndpunktbereich</code>) und dort die Funktion implementieren, die man in der <code>Main.hs</code> benutzt hat. In dem Handler habt ihr dann keinen Stress mehr mit Validierung, networking, logging, etc. pp. weil alles in der Main abgehandelt wurde und ihr nur noch den “Happy-Case” implementieren müsst. Beispiel für unseren Handler oben:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ot">myApiEndpointV1Post ::</span> <span class="dt">MonadIO</span> m <span class="ot">=&gt;</span> <span class="dt">ServerConfig</span> <span class="ot">-&gt;</span> (<span class="dt">ClientEnv</span>,<span class="dt">ClientEnv</span>) <span class="ot">-&gt;</span> <span class="dt">TQueue</span> <span class="dt">BS.ByteString</span> <span class="ot">-&gt;</span> ([<span class="dt">LogItem</span>] <span class="ot">-&gt;</span> <span class="dt">IO</span> ()) <span class="ot">-&gt;</span> <span class="dt">Request</span> <span class="ot">-&gt;</span> m <span class="dt">Response</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10"><pre class="sourceCode haskell code-with-copy"><code class="sourceCode haskell"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ot">myApiEndpointV1Post ::</span> <span class="dt">MonadIO</span> m <span class="ot">=&gt;</span> <span class="dt">ServerConfig</span> <span class="ot">-&gt;</span> (<span class="dt">ClientEnv</span>,<span class="dt">ClientEnv</span>) <span class="ot">-&gt;</span> <span class="dt">TQueue</span> <span class="dt">BS.ByteString</span> <span class="ot">-&gt;</span> ([<span class="dt">LogItem</span>] <span class="ot">-&gt;</span> <span class="dt">IO</span> ()) <span class="ot">-&gt;</span> <span class="dt">Request</span> <span class="ot">-&gt;</span> m <span class="dt">Response</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>myApiEndpointV1Post sc calls amqPost <span class="fu">log</span> req <span class="ot">=</span> <span class="kw">do</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> liftIO <span class="op">.</span> <span class="fu">log</span> <span class="op">$</span> [<span class="dt">Info</span> <span class="op">$</span> <span class="st">"recieved "</span><span class="op">&lt;&gt;</span>pretty req] <span class="co">-- input-logging</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> liftIO <span class="op">.</span> atomically <span class="op">.</span> writeTQueue <span class="op">.</span> LBS.toStrict <span class="op">$</span> <span class="st">"{\"hey Kibana, i recieved:\""</span> <span class="op">&lt;&gt;</span> A.encode (pretty req) <span class="op">&lt;&gt;</span> <span class="st">"}"</span> <span class="co">-- log in activeMQ/Kibana</span></span>
@ -1064,7 +1069,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a> liftIO <span class="op">.</span> access pipe master <span class="st">"DatabaseName"</span> <span class="op">$</span> <span class="kw">do</span></span>
<span id="cb10-13"><a href="#cb10-13" aria-hidden="true" tabindex="-1"></a> ifM (auth (myServiceMongoUsername sc) (myServiceMongoPassword sc)) (<span class="fu">return</span> ()) (liftIO <span class="op">.</span> printLog <span class="op">.</span> <span class="fu">pure</span> <span class="op">.</span> <span class="dt">Error</span> <span class="op">$</span> <span class="st">"MongoDB: Login failed."</span>)</span>
<span id="cb10-14"><a href="#cb10-14" aria-hidden="true" tabindex="-1"></a> save <span class="st">"DatabaseCollection"</span> [<span class="st">"_id"</span> <span class="op">=:</span> <span class="dv">1337</span>, <span class="st">"entry"</span> <span class="op">=:</span> ret] <span class="co">-- selbe id wie oben ;)</span></span>
<span id="cb10-15"><a href="#cb10-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span> ret</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb10-15"><a href="#cb10-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span> ret</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Diese dummy-Antwort führt auf, wie gut man die ganzen Sachen mischen kann.</p>
<ul>
<li>Logging in die Dateien/<code>stdout</code> - je nach Konfiguration</li>
@ -1085,7 +1090,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
</section>
<section id="wie-sorge-ich-für-bessere-warnungen-damit-der-compiler-meine-bugs-fängt" class="level5">
<h5 class="anchored" data-anchor-id="wie-sorge-ich-für-bessere-warnungen-damit-der-compiler-meine-bugs-fängt">Wie sorge ich für bessere Warnungen, damit der Compiler meine Bugs fängt?</h5>
<div class="sourceCode" id="cb11"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> build <span class="at">--file-watch</span> <span class="at">--ghc-options</span> <span class="st">'-freverse-errors -W -Wall -Wcompat'</span> <span class="at">--interleaved-output</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">stack</span> build <span class="at">--file-watch</span> <span class="at">--ghc-options</span> <span class="st">'-freverse-errors -W -Wall -Wcompat'</span> <span class="at">--interleaved-output</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Was tut das?</p>
<ul>
<li><code>--file-watch</code>: automatisches (minimales) kompilieren bei dateiänderungen</li>
@ -1153,7 +1158,7 @@ pre > code.sourceCode > span > a:first-child::before { text-decoration: underlin
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -673,7 +678,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -1,14 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="description" content="Aktuelle Wege ein LLM dazu zu “motivieren”, was man möchte.">
<title>Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis Nicole Dresselhaus</title>
<title>Placeholder Nicole Dresselhaus</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
@ -33,17 +32,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -58,36 +59,27 @@ ul.task-list li input[type="checkbox"] {
],
"show-item-context": false,
"language": {
"search-no-results-text": "Keine Treffer",
"search-matching-documents-text": "Treffer",
"search-copy-link-title": "Link in die Suche kopieren",
"search-hide-matches-text": "Zusätzliche Treffer verbergen",
"search-more-match-text": "weitere Treffer in diesem Dokument",
"search-more-matches-text": "weitere Treffer in diesem Dokument",
"search-clear-button-title": "Zurücksetzen",
"search-no-results-text": "No results",
"search-matching-documents-text": "matching documents",
"search-copy-link-title": "Copy link to search",
"search-hide-matches-text": "Hide additional matches",
"search-more-match-text": "more match in this document",
"search-more-matches-text": "more matches in this document",
"search-clear-button-title": "Clear",
"search-text-placeholder": "",
"search-detached-cancel-button-title": "Abbrechen",
"search-submit-button-title": "Abschicken",
"search-label": "Suchen"
"search-detached-cancel-button-title": "Cancel",
"search-submit-button-title": "Submit",
"search-label": "Search"
}
}</script>
<meta name="quarto:status" content="draft">
<meta property="og:title" content="Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis Nicole Dresselhaus">
<meta property="og:description" content="Aktuelle Wege ein LLM dazu zu “motivieren”, was man möchte.">
<meta property="og:title" content="Placeholder Nicole Dresselhaus">
<meta property="og:site_name" content="Nicole Dresselhaus">
<meta name="citation_title" content="Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis">
<meta name="citation_abstract" content="Damit das LLMs keinen &amp;amp;quot;mist&quot; bauen, wird in diesem Beispiel eine Antwort*struktur* vorgegeben, der einfach zu folgen ist. Trotzdem bleibt das immer noch nur &quot;fancy next word prediction&quot; - aber immerhin besser, als alles, was man sonst in 1 Minute aus dem Ärmel schüttelt.">
<meta name="citation_author" content="Nicole Dresselhaus">
<meta name="citation_publication_date" content="2025-06-13">
<meta name="citation_cover_date" content="2025-06-13">
<meta name="citation_year" content="2025">
<meta name="citation_online_date" content="2025-06-13">
<meta name="citation_fulltext_html_url" content="https://drezil.de/Obsidian-Articles/Artikelbewertung durch LLM.html">
<meta name="citation_language" content="de">
</head>
<body class="nav-sidebar docked nav-fixed slimcontent quarto-light"><script id="quarto-html-before-body" type="application/javascript">
<body class="nav-sidebar docked nav-fixed quarto-light"><script id="quarto-html-before-body" type="application/javascript">
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
@ -105,7 +97,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -138,7 +130,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -178,7 +170,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -206,7 +198,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -229,17 +221,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -250,7 +245,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -258,27 +253,29 @@ ul.task-list li input[type="checkbox"] {
</script>
<div id="quarto-search-results"></div>
<header id="quarto-header" class="headroom fixed-top">
<header id="quarto-header" class="headroom fixed-top"><div id="quarto-draft-alert" class="alert alert-warning"><i class="bi bi-pencil-square"></i>Draft</div>
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
</div>
<div id="quarto-search" class="" title="Suchen"></div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Navigation umschalten" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<div id="quarto-search" class="" title="Search"></div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -292,8 +289,8 @@ ul.task-list li input[type="checkbox"] {
</ul>
</div> <!-- /navcollapse -->
<div class="quarto-navbar-tools">
<a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Dunkelmodus umschalten"><i class="bi"></i></a>
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Lesemodus umschalten">
<a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a>
<a href="" class="quarto-reader-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleReader(); return false;" title="Toggle reader mode">
<div class="quarto-reader-toggle-btn">
<i class="bi"></i>
</div>
@ -303,11 +300,11 @@ ul.task-list li input[type="checkbox"] {
</nav>
<nav class="quarto-secondary-nav">
<div class="container-fluid d-flex">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Seitenleiste umschalten" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Serious</li><li class="breadcrumb-item"><a href="../Writing/coding-age-ai.html">Writing</a></li><li class="breadcrumb-item"><a href="../Obsidian-Articles/Artikelbewertung durch LLM.html">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</a></li></ol></nav>
<a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Seitenleiste umschalten" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Placeholder</li></ol></nav>
<a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
</div>
</nav>
@ -316,26 +313,30 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true">
<span class="menu-text">Serious</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="true">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="false">
<span class="menu-text">Writing</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="true" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth2 show">
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth2 ">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Writing/coding-age-ai.html" class="sidebar-item-text sidebar-link">
@ -359,12 +360,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -372,7 +367,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" role="navigation" aria-expanded="false">
<span class="menu-text">Coding</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -381,7 +376,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" role="navigation" aria-expanded="false">
<span class="menu-text">Haskell</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -408,7 +403,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-5" role="navigation" aria-expanded="false">
<span class="menu-text">Code Snippets</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-5" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-5" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -431,7 +426,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a href="../Coding/Haskell/Webapp-Example/index.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Webapp-Development in Haskell</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-6" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-6" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -458,7 +453,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-7" role="navigation" aria-expanded="false">
<span class="menu-text">Health</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-7" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-7" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -475,7 +470,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-8" role="navigation" aria-expanded="false">
<span class="menu-text">Uni</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-8" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-8" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -495,7 +490,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-9" role="navigation" aria-expanded="true">
<span class="menu-text">Fun</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-9" role="navigation" aria-expanded="true" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-9" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -504,7 +499,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-10" role="navigation" aria-expanded="false">
<span class="menu-text">Opinions</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-10" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-10" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -527,7 +522,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-11" role="navigation" aria-expanded="false">
<span class="menu-text">Stuff</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-11" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-11" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -547,7 +542,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-12" role="navigation" aria-expanded="true">
<span class="menu-text">Info</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-12" role="navigation" aria-expanded="true" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-12" role="navigation" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -556,7 +551,7 @@ ul.task-list li input[type="checkbox"] {
<div class="sidebar-item-container">
<a href="../About/index.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">About me</span></a>
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-13" role="navigation" aria-expanded="false" aria-label="Abschnitt umschalten">
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-13" role="navigation" aria-expanded="false" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
@ -588,186 +583,34 @@ ul.task-list li input[type="checkbox"] {
</nav>
<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div>
<!-- margin-sidebar -->
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
<nav id="TOC" role="doc-toc" class="toc-active">
<h2 id="toc-title">Auf dieser Seite</h2>
<ul>
<li><a href="#hintergrund" id="toc-hintergrund" class="nav-link active" data-scroll-target="#hintergrund">Hintergrund</a></li>
<li><a href="#llm-interaktion" id="toc-llm-interaktion" class="nav-link" data-scroll-target="#llm-interaktion">LLM-Interaktion</a></li>
</ul>
</nav>
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar zindex-bottom">
</div>
<!-- main -->
<main class="content page-columns page-full" id="quarto-document-content">
<main class="content" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item">Serious</li><li class="breadcrumb-item"><a href="../Writing/coding-age-ai.html">Writing</a></li><li class="breadcrumb-item"><a href="../Obsidian-Articles/Artikelbewertung durch LLM.html">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</a></li></ol></nav>
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</h1>
<div class="quarto-categories">
<div class="quarto-category">Praxis</div>
<div class="quarto-category">Beispiel</div>
<div class="quarto-category">ML</div>
<div class="quarto-category">Experience</div>
</div>
</div>
<div>
<div class="description">
Aktuelle Wege ein LLM dazu zu “motivieren”, was man möchte.
</div>
<h1 class="title">Placeholder</h1>
</div>
<div class="quarto-title-meta">
<div>
<div class="quarto-title-meta-heading">Autor:in</div>
<div class="quarto-title-meta-contents">
<p>Nicole Dresselhaus </p>
</div>
</div>
<div>
<div class="quarto-title-meta-heading">Veröffentlichungsdatum</div>
<div class="quarto-title-meta-contents">
<p class="date">13. Juni 2025</p>
</div>
</div>
</div>
<div>
<div class="abstract">
<div class="block-title">Zusammenfassung</div>
Damit das LLMs keinen “mist” bauen, wird in diesem Beispiel eine Antwort<em>struktur</em> vorgegeben, der einfach zu folgen ist. Trotzdem bleibt das immer noch nur “fancy next word prediction” - aber immerhin besser, als alles, was man sonst in 1 Minute aus dem Ärmel schüttelt.
</div>
</div>
</header>
<section id="hintergrund" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="hintergrund">Hintergrund</h2>
<p>Untenstehend ein Praxisbeispiel, wie ich momentan ein LLM aufrufe um sinnvolle(!) Antworten zu bekommen. Das ganze läuft lokal via <code>ollama</code>.<br>
In den Kontext setzt das <code>avante</code>-plugin<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> ein großes system-prompt und fügt dort die gesamte Datei (in diesem Fall ein sehr langer <code>markdown</code>-text) ein.</p>
<div class="no-row-height column-margin column-container"><div id="fn1"><p><sup>1</sup>&nbsp;Neovim-Plugin, was den Editor quasi zu einem cursor.ai oder einem VS-Code mit allen Späßen aufbohrt</p></div></div><p>Insbesondere sieht man hier: Damit das LLM keinen “mist” baut oder zu sehr halluziniert, wird eine Antwort<em>struktur</em> vorgegeben, der einfach zu folgen ist. Trotzdem ist das immer noch nur “fancy next word prediction” - aber immerhin besser, als alles, was man sonst in 1 Minute aus dem Ärmel schüttelt.</p>
</section>
<section id="llm-interaktion" class="level2">
<h2 class="anchored" data-anchor-id="llm-interaktion">LLM-Interaktion</h2>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Call Metadata
</div>
</div>
<div class="callout-body-container callout-body">
<ul>
<li>Datetime: 2025-06-05 13:47:11</li>
<li>Model: ollama/cogito:14b</li>
<li>Selected files:
<ul>
<li>background/BACKGROUND.md</li>
</ul></li>
</ul>
</div>
</div>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warnung
</div>
</div>
<div class="callout-body-container callout-body">
<p>Enable deep thinking subroutine.</p>
<p>Welche Absätze gleichen sich inhaltlich zu stark? Welche Absätze sollten in andere Kapitel wandern?</p>
<p>Gehe den Text im Geiste Absatz für Absatz durch und zeig mir, dass du ihn gelesen hast.</p>
<p>Ein einfaches: "&lt;Absatztitel&gt;: ok" oder "&lt;Absatztitel&gt;: xx gefunden" reicht um pro Absatz eine Aussage zu treffen.</p>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
🤔 Thought content
</div>
</div>
<div class="callout-body-container callout-body">
<ol type="1">
<li>Einleitung: Einführung in die Bedeutung der Dokumentation - ok</li>
<li>Inhaltliche Anforderungen an die Dokumentation:
<ul>
<li>Hier werden spezifische Inhalte definiert, die dokumentiert werden müssen</li>
<li>Keine Überschneidung mit anderen Abschnitten</li>
</ul></li>
<li>Format und Struktur der Dokumentation:
<ul>
<li>Fokussiert auf die Formate und Strukturen der Dokumentation</li>
<li>Keine Überschneidung mit Inhaltlichen Anforderungen</li>
</ul></li>
<li>Was macht eine gute Dokumentation aus:
<ul>
<li>Hier werden allgemeine Prinzipien für gute Dokumentation erläutert</li>
<li>Teile könnten in “Inhaltliche Anforderungen” oder “Format und Struktur” übernommen werden</li>
</ul></li>
<li>(Teil-)automatisierte Dokumentationswerkzeuge:
<ul>
<li>Beschreibt spezifische Tools zur Automatisierung der Dokumentation</li>
<li>Keine Überschneidung mit anderen Abschnitten</li>
</ul></li>
<li>Best Practices, Vorlagen und Checklisten:
<ul>
<li>Enthält praktische Ratschläge und Werkzeuge</li>
<li>Teile könnten in “Format und Struktur” oder “Was macht eine gute Dokumentation aus” integriert werden</li>
</ul></li>
<li>Implementierung aller Vorschläge als ready-to-use Repository:
<ul>
<li>Beschreibt die Umsetzung der Empfehlungen</li>
<li>Keine Überschneidung mit anderen Abschnitten</li>
</ul></li>
<li>Fazit:
<ul>
<li>Zusammenfassung und Schlussfolgerung</li>
<li>Keine Überschneidung mit anderen Abschnitten</li>
</ul></li>
</ol>
</div>
</div>
<div class="callout callout-style-default callout-tip callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Repsonse
</div>
</div>
<div class="callout-body-container callout-body">
<p>Einleitung: ok</p>
<p>Inhaltliche Anforderungen an die Dokumentation: ok</p>
<p>Format und Struktur der Dokumentation: ok</p>
<p>Was macht eine gute Dokumentation aus: “Nutzungshilfen außerhalb der Dokumentation” könnte in “Format und Struktur” übernommen werden</p>
<p>(Teil-)automatisierte Dokumentationswerkzeuge: ok</p>
<p>Best Practices, Vorlagen und Checklisten: “Checkliste für die Mindest-Dokumentation” könnte in “Inhaltliche Anforderungen” integriert werden</p>
<p>Implementierung aller Vorschläge als ready-to-use Repository: ok</p>
<p>Fazit: ok</p>
</div>
</div>
</section>
</main> <!-- /main -->
<script id="quarto-html-after-body" type="application/javascript">
@ -784,7 +627,7 @@ Repsonse
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
@ -808,12 +651,12 @@ Repsonse
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Kopiert");
button.setAttribute("title", "Copied!");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "Kopiert");
button.setAttribute("data-bs-title", "Copied!");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -32,17 +32,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -95,7 +97,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -128,7 +130,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -168,7 +170,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -196,7 +198,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -219,17 +221,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -240,7 +245,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -252,6 +257,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -263,12 +270,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -306,6 +313,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -349,12 +360,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -676,7 +681,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -658,7 +663,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -645,7 +650,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -674,7 +679,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -33,17 +33,19 @@ ul.task-list li input[type="checkbox"] {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -96,7 +98,7 @@ ul.task-list li input[type="checkbox"] {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -129,7 +131,7 @@ ul.task-list li input[type="checkbox"] {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -169,7 +171,7 @@ ul.task-list li input[type="checkbox"] {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -197,7 +199,7 @@ ul.task-list li input[type="checkbox"] {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -220,17 +222,20 @@ ul.task-list li input[type="checkbox"] {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -241,7 +246,7 @@ ul.task-list li input[type="checkbox"] {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -253,6 +258,8 @@ ul.task-list li input[type="checkbox"] {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -264,12 +271,12 @@ ul.task-list li input[type="checkbox"] {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -307,6 +314,10 @@ ul.task-list li input[type="checkbox"] {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -350,12 +361,6 @@ ul.task-list li input[type="checkbox"] {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -729,7 +734,7 @@ ul.task-list li input[type="checkbox"] {
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -52,17 +52,19 @@ div.csl-indent {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -113,18 +115,18 @@ div.csl-indent {
<meta name="citation_online_date" content="2025-04-24">
<meta name="citation_fulltext_html_url" content="https://drezil.de/Writing/Obsidian-RAG.html">
<meta name="citation_language" content="de">
<meta name="citation_reference" content="citation_title=Ollama - Chroma Cookbook;,citation_publication_date=2024-04;,citation_cover_date=2024-04;,citation_year=2024;,citation_fulltext_html_url=https://cookbook.chromadb.dev/integrations/ollama/embeddings/;">
<meta name="citation_reference" content="citation_title=Just wanted to mention that the smart connections plugin is incredible. : r/ObsidianMD;,citation_publication_date=2024-10;,citation_cover_date=2024-10;,citation_year=2024;,citation_fulltext_html_url=https://www.reddit.com/r/ObsidianMD/comments/1fzmkdk/just_wanted_to_mention_that_the_smart_connections/;">
<meta name="citation_reference" content="citation_title=Khoj: An AI powered Search Assistant for your Second Brain - Share &amp;amp;amp; showcase - Obsidian Forum;,citation_publication_date=2023-07;,citation_cover_date=2023-07;,citation_year=2023;,citation_fulltext_html_url=https://forum.obsidian.md/t/khoj-an-ai-powered-search-assistant-for-you-second-brain/53756;">
<meta name="citation_reference" content="citation_title=Supercharging Obsidian Search with AI and Ollama;,citation_author=undefined @airabbitX;,citation_publication_date=2024-11;,citation_cover_date=2024-11;,citation_year=2024;,citation_fulltext_html_url=https://medium.com/@airabbitX/supercharging-obsidian-search-with-local-llms-a-personal-journey-1e008eb649a6;">
<meta name="citation_reference" content="citation_title=Export to common graph formats - Plugins ideas - Obsidian Forum;,citation_publication_date=2020-02;,citation_cover_date=2020-02;,citation_year=2020;,citation_fulltext_html_url=https://forum.obsidian.md/t/export-to-common-graph-formats/4138;">
<meta name="citation_reference" content="citation_title=Personal Knowledge Graphs in Obsidian;,citation_author=Volodymyr Pavlyshyn;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://volodymyrpavlyshyn.medium.com/personal-knowledge-graphs-in-obsidian-528a0f4584b9;">
<meta name="citation_reference" content="citation_title=How to export your Obsidian Vault to RDF;,citation_author=Volodymyr Pavlyshyn;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://volodymyrpavlyshyn.medium.com/how-to-export-your-obsidian-vault-to-rdf-00fb2539ed18;">
<meta name="citation_reference" content="citation_title=AI empowered Zettelkasten with NER and Graph LLM - Knowledge management - Obsidian Forum;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://forum.obsidian.md/t/ai-empowered-zettelkasten-with-ner-and-graph-llm/79112;">
<meta name="citation_reference" content="citation_title=Build your second brain with Khoj AI;,citation_publication_date=2024-06;,citation_cover_date=2024-06;,citation_year=2024;,citation_fulltext_html_url=https://dswharshit.medium.com/build-your-second-brain-with-khoj-ai-high-signal-ai-2-87492730d7ce;">
<meta name="citation_reference" content="citation_title=Second Brain Assistant with Obsidian;,citation_publication_date=2025-03;,citation_cover_date=2025-03;,citation_year=2025;,citation_fulltext_html_url=https://www.ssp.sh/brain/second-brain-assistant-with-obsidian-notegpt/;">
<meta name="citation_reference" content="citation_title=Basic Memory | AI Conversations That Build Knowledge;,citation_fulltext_html_url=https://basicmachines.co/;">
<meta name="citation_reference" content="citation_title=Local (Free) RAG with Question Generation using LM Studio, Nomic embeddings, ChromaDB and Llama 3.2 on a Mac mini M1;,citation_author=Oscar Galvis;,citation_publication_date=2024-10;,citation_cover_date=2024-10;,citation_year=2024;,citation_fulltext_html_url=https://lomaky.medium.com/local-free-rag-with-question-generation-using-lm-studio-nomic-embeddings-chromadb-and-llama-3-2-9758877e93b4;">
<meta name="citation_reference" content="citation_title=Ollama - chroma cookbook;,citation_publication_date=2024-04;,citation_cover_date=2024-04;,citation_year=2024;,citation_fulltext_html_url=https://cookbook.chromadb.dev/integrations/ollama/embeddings/;">
<meta name="citation_reference" content="citation_title=Just wanted to mention that the smart connections plugin is incredible. : R/ObsidianMD;,citation_publication_date=2024-10;,citation_cover_date=2024-10;,citation_year=2024;,citation_fulltext_html_url=https://www.reddit.com/r/ObsidianMD/comments/1fzmkdk/just_wanted_to_mention_that_the_smart_connections/;">
<meta name="citation_reference" content="citation_title=Khoj: An AI powered search assistant for your second brain - share &amp;amp;amp; showcase - obsidian forum;,citation_publication_date=2023-07;,citation_cover_date=2023-07;,citation_year=2023;,citation_fulltext_html_url=https://forum.obsidian.md/t/khoj-an-ai-powered-search-assistant-for-you-second-brain/53756;">
<meta name="citation_reference" content="citation_title=Supercharging obsidian search with AI and ollama;,citation_author=undefined @airabbitX;,citation_publication_date=2024-11;,citation_cover_date=2024-11;,citation_year=2024;,citation_fulltext_html_url=https://medium.com/@airabbitX/supercharging-obsidian-search-with-local-llms-a-personal-journey-1e008eb649a6;">
<meta name="citation_reference" content="citation_title=Export to common graph formats - plugins ideas - obsidian forum;,citation_publication_date=2020-02;,citation_cover_date=2020-02;,citation_year=2020;,citation_fulltext_html_url=https://forum.obsidian.md/t/export-to-common-graph-formats/4138;">
<meta name="citation_reference" content="citation_title=Personal knowledge graphs in obsidian;,citation_author=Volodymyr Pavlyshyn;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://volodymyrpavlyshyn.medium.com/personal-knowledge-graphs-in-obsidian-528a0f4584b9;">
<meta name="citation_reference" content="citation_title=How to export your obsidian vault to RDF;,citation_author=Volodymyr Pavlyshyn;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://volodymyrpavlyshyn.medium.com/how-to-export-your-obsidian-vault-to-rdf-00fb2539ed18;">
<meta name="citation_reference" content="citation_title=AI empowered zettelkasten with NER and graph LLM - knowledge management - obsidian forum;,citation_publication_date=2024-03;,citation_cover_date=2024-03;,citation_year=2024;,citation_fulltext_html_url=https://forum.obsidian.md/t/ai-empowered-zettelkasten-with-ner-and-graph-llm/79112;">
<meta name="citation_reference" content="citation_title=Build your second brain with khoj AI;,citation_publication_date=2024-06;,citation_cover_date=2024-06;,citation_year=2024;,citation_fulltext_html_url=https://dswharshit.medium.com/build-your-second-brain-with-khoj-ai-high-signal-ai-2-87492730d7ce;">
<meta name="citation_reference" content="citation_title=Second brain assistant with obsidian;,citation_publication_date=2025-03;,citation_cover_date=2025-03;,citation_year=2025;,citation_fulltext_html_url=https://www.ssp.sh/brain/second-brain-assistant-with-obsidian-notegpt/;">
<meta name="citation_reference" content="citation_title=Basic memory | AI conversations that build knowledge;,citation_fulltext_html_url=https://basicmachines.co/;">
<meta name="citation_reference" content="citation_title=Local (free) RAG with question generation using LM studio, nomic embeddings, ChromaDB and llama 3.2 on a mac mini M1;,citation_author=Oscar Galvis;,citation_publication_date=2024-10;,citation_cover_date=2024-10;,citation_year=2024;,citation_fulltext_html_url=https://lomaky.medium.com/local-free-rag-with-question-generation-using-lm-studio-nomic-embeddings-chromadb-and-llama-3-2-9758877e93b4;">
<meta name="citation_reference" content="citation_title=privateGPT / llama.cpp based scripts;,citation_publication_date=2025-03;,citation_cover_date=2025-03;,citation_year=2025;,citation_fulltext_html_url=https://www.ssp.sh/brain/second-brain-assistant-with-obsidian-notegpt/;">
</head>
@ -146,7 +148,7 @@ div.csl-indent {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -179,7 +181,7 @@ div.csl-indent {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -219,7 +221,7 @@ div.csl-indent {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -247,7 +249,7 @@ div.csl-indent {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -270,17 +272,20 @@ div.csl-indent {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -291,7 +296,7 @@ div.csl-indent {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -303,6 +308,8 @@ div.csl-indent {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -314,12 +321,12 @@ div.csl-indent {
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -357,6 +364,10 @@ div.csl-indent {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -400,12 +411,6 @@ div.csl-indent {
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -1203,7 +1208,7 @@ Für bestimmte Felder wie ORCID wird ein rein lokales LLM kaum die Werte erraten
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -6,6 +6,10 @@
var hash = window.location.hash.startsWith('#') ? window.location.hash.slice(1) : window.location.hash;
var redirect = redirects[hash] || redirects[""] || "/";
window.document.title = 'Redirect to ' + redirect;
if (!redirects[hash]) {
redirect = redirect + window.location.hash;
}
redirect = redirect + window.location.search;
window.location.replace(redirect);
</script>
</head>

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -53,17 +53,19 @@ div.csl-indent {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -115,19 +117,19 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<meta name="citation_language" content="de">
<meta name="citation_reference" content="citation_title=Collaborative Historical Research in the Age of Big Data: Lessons from an Interdisciplinary Project;,citation_abstract=This book is output of the Living with Machines project;,citation_author=Ruth Ahnert;,citation_author=Emma Griffin;,citation_author=Mia Ridge;,citation_author=Giorgia Tolfo;,citation_publication_date=2023;,citation_cover_date=2023;,citation_year=2023;,citation_fulltext_html_url=https://www.cambridge.org/core/elements/collaborative-historical-research-in-the-age-of-big-data/839C422CCAA6C1699DE8D353B3A1960D;,citation_doi=10.1017/9781009175548;,citation_language=en-US;,citation_series_title=Cambridge Elements: Historical Theory and Practice;">
<meta name="citation_reference" content="citation_title=DFG-Praxisregeln &amp;amp;amp;quot;Digitalisierung&amp;quot;. Aktualisierte Fassung 2022.;,citation_abstract=Die DFG-Praxisregeln „Digitalisierung“ stellen eine zentrale Grundlage für DFG-geförderte Projekte im Programm „Digitalisierung und Erschließung“ dar: Sie formulieren Standards und enthalten Informationen zu organisatorischen, methodischen und technischen Fragen im Kontext der Digitalisierung und Erschließung forschungsrelevanter Objekte. Sie leisten damit einen wichtigen Beitrag zur Nachhaltigkeit, Zugänglichkeit und Anschlussfähigkeit geförderter Projekte und der in diesem Zusammenhang entstehenden Infrastruktur. Das vorliegende Dokument stellt eine aktualisierte Fassung der zuletzt 2016 durch die DFG publizierten Praxisregeln dar. Es wurde in Absprache mit der DFG-Geschäftsstelle durch eine vom NFDI-Konsortium NFDI4Culture initiierte Autor*innengruppe erarbeitet, deren Mitglieder mehrheitlich seit langem an der Ausgestaltung der Praxisregeln beteiligt waren sowie aktiv in die NFDI-Konsortien NFDI4Culture, NFDI4Memory, NFDI4Objects und Text+ eingebunden sind. Die jetzt überarbeitet vorliegenden Praxisregeln „Digitalisierung“ dienen als Ausgangspunkt für eine material- und communitybezogene Ausdifferenzierung der Praxisregeln durch die Communitys. Alle mit der Digitalisierung forschungsrelevanter Objekte befassten Communitys und Einrichtungen sind dazu aufgerufen, mit ihrer Expertise am weiteren Prozess mitzuwirken.;,citation_author=Reinhard Altenhöner;,citation_author=Andreas Berger;,citation_author=Christian Bracht;,citation_author=Paul Klimpel;,citation_author=Sebastian Meyer;,citation_author=Andreas Neuburger;,citation_author=Thomas Stäcker;,citation_author=Regine Stein;,citation_publication_date=2023-02-16;,citation_cover_date=2023-02-16;,citation_year=2023;,citation_fulltext_html_url=https://zenodo.org/record/7435724;,citation_language=deu;">
<meta name="citation_reference" content="citation_title=Introducing the FAIR Principles for Research Software;,citation_abstract=Research software is a fundamental and vital part of research, yet significant challenges to discoverability, productivity, quality, reproducibility, and sustainability exist. Improving the practice of scholarship is a common goal of the open science, open source, and FAIR (Findable, Accessible, Interoperable and Reusable) communities and research software is now being understood as a type of digital object to which FAIR should be applied. This emergence reflects a maturation of the research community to better understand the crucial role of FAIR research software in maximising research value. The FAIR for Research Software (FAIR4RS) Working Group has adapted the FAIR Guiding Principles to create the FAIR Principles for Research Software (FAIR4RS Principles). The contents and context of the FAIR4RS Principles are summarised here to provide the basis for discussion of their adoption. Examples of implementation by organisations are provided to share information on how to maximise the value of research outputs, and to encourage others to amplify the importance and impact of this work.;,citation_author=Michelle Barker;,citation_author=Neil P. Chue Hong;,citation_author=Daniel S. Katz;,citation_author=Anna-Lena Lamprecht;,citation_author=Carlos Martinez-Ortiz;,citation_author=Fotis Psomopoulos;,citation_author=Jennifer Harrow;,citation_author=Leyla Jael Castro;,citation_author=Morane Gruenpeter;,citation_author=Paula Andrea Martinez;,citation_author=Tom Honeyman;,citation_publication_date=2022-10-14;,citation_cover_date=2022-10-14;,citation_year=2022;,citation_fulltext_html_url=https://www.nature.com/articles/s41597-022-01710-x;,citation_issue=1;,citation_doi=10.1038/s41597-022-01710-x;,citation_issn=2052-4463;,citation_volume=9;,citation_language=en-US;,citation_journal_title=Scientific Data;,citation_journal_abbrev=Sci Data;,citation_publisher=Nature Publishing Group;">
<meta name="citation_reference" content="citation_title=Introducing the FAIR Principles for research software;,citation_abstract=Research software is a fundamental and vital part of research, yet significant challenges to discoverability, productivity, quality, reproducibility, and sustainability exist. Improving the practice of scholarship is a common goal of the open science, open source, and FAIR (Findable, Accessible, Interoperable and Reusable) communities and research software is now being understood as a type of digital object to which FAIR should be applied. This emergence reflects a maturation of the research community to better understand the crucial role of FAIR research software in maximising research value. The FAIR for Research Software (FAIR4RS) Working Group has adapted the FAIR Guiding Principles to create the FAIR Principles for Research Software (FAIR4RS Principles). The contents and context of the FAIR4RS Principles are summarised here to provide the basis for discussion of their adoption. Examples of implementation by organisations are provided to share information on how to maximise the value of research outputs, and to encourage others to amplify the importance and impact of this work.;,citation_author=Michelle Barker;,citation_author=Neil P. Chue Hong;,citation_author=Daniel S. Katz;,citation_author=Anna-Lena Lamprecht;,citation_author=Carlos Martinez-Ortiz;,citation_author=Fotis Psomopoulos;,citation_author=Jennifer Harrow;,citation_author=Leyla Jael Castro;,citation_author=Morane Gruenpeter;,citation_author=Paula Andrea Martinez;,citation_author=Tom Honeyman;,citation_publication_date=2022-10-14;,citation_cover_date=2022-10-14;,citation_year=2022;,citation_fulltext_html_url=https://www.nature.com/articles/s41597-022-01710-x;,citation_issue=1;,citation_doi=10.1038/s41597-022-01710-x;,citation_issn=2052-4463;,citation_volume=9;,citation_language=en-US;,citation_journal_title=Scientific Data;,citation_journal_abbrev=Sci Data;,citation_publisher=Nature Publishing Group;">
<meta name="citation_reference" content="citation_title=Projektmanagement und Digital Humanities: Zur klugen Gestaltung der Zusammenarbeit;,citation_abstract=Die Professionalisierung des Projektmanagements in den Digital Humanities: Theorie und Praxis zum Weiterdenken.;,citation_editor=Fabian Cremer;,citation_editor=Swantje Dogunke;,citation_editor=Anna Maria Neubert;,citation_editor=Thorsten Wübbena;,citation_publication_date=2024-04;,citation_cover_date=2024-04;,citation_year=2024;,citation_doi=10.14361/9783839469675;,citation_language=de-DE;">
<meta name="citation_reference" content="citation_title=The Journal of Open Source Software (JOSS): Bringing Open-Source Software Practices to the Scholarly Publishing Community for Authors, Reviewers, Editors, and Publishers;,citation_abstract=Introduction: Open-source software (OSS) is a critical component of open science, but contributions to the OSS ecosystem are systematically undervalued in the current academic system. The Journal of Open Source Software (JOSS) contributes to addressing this by providing a venue (that is itself free, diamond open access, and all open-source, built in a layered structure using widely available elements/services of the scholarly publishing ecosystem) for publishing OSS, run in the style of OSS itself. A particularly distinctive element of JOSS is that it uses open peer review in a collaborative, iterative format, unlike most publishers. Additionally, all the components of the process—from the reviews to the papers to the software that is the subject of the papers to the software that the journal runs—are open. Background: We describe JOSSs history and its peer review process using an editorial bot, and we present statistics gathered from JOSSs public review history on GitHub showing an increasing number of peer reviewed papers each year. We discuss the new JOSSCast and use it as a data source to understand reasons why interviewed authors decided to publish in JOSS. Discussion and Outlook: JOSSs process differs significantly from traditional journals, which has impeded JOSSs inclusion in indexing services such as Web of Science. In turn, this discourages researchers within certain academic systems, such as Italys, which emphasize the importance of Web of Science and/or Scopus indexing for grant applications and promotions. JOSS is a fully diamond open-access journal with a cost of around US$5 per paper for the 401 papers published in 2023. The scalability of running JOSS with volunteers and financing JOSS with grants and donations is discussed.;,citation_author=Patrick Diehl;,citation_author=Charlotte Soneson;,citation_author=Rachel C. Kurchin;,citation_author=Ross Mounce;,citation_author=Daniel S. Katz;,citation_publication_date=2025-02-04;,citation_cover_date=2025-02-04;,citation_year=2025;,citation_fulltext_html_url=https://www.iastatedigitalpress.com/jlsc/article/id/18285/;,citation_issue=2, 2;,citation_doi=10.31274/jlsc.18285;,citation_issn=2162-3309;,citation_volume=12;,citation_language=en-US;,citation_journal_title=Journal of Librarianship and Scholarly Communication;,citation_publisher=Iowa State University Digital Press;">
<meta name="citation_reference" content="citation_title=Endings Principles for Digital Longevity;,citation_abstract=Enabling Sustainable Digital Humanities Projects;,citation_author=Endings Project Team;,citation_publication_date=2023-03-03;,citation_cover_date=2023-03-03;,citation_year=2023;,citation_fulltext_html_url=https://endings.uvic.ca/principles.html;,citation_language=en-US;">
<meta name="citation_reference" content="citation_title=Leitlinien zur Sicherung guter wissenschaftlicher Praxis;,citation_abstract=The DFG´s Code of Conduct “Safeguarding Good Research Practice” represents the consensus among the member organisations of the DFG on the fundamental principles and standards of good practice and are upheld by these organisations. These guidelines underline the importance of integrity in the everyday practice of research and provide researchers with a reliable reference with which to embed good research practice as an established and binding aspect of their work.;,citation_publication_date=2024-09;,citation_cover_date=2024-09;,citation_year=2024;,citation_fulltext_html_url=https://zenodo.org/records/14281892;,citation_doi=10.5281/zenodo.14281892;,citation_language=de-DE;,citation_publisher=Deutsche Forschungsgemeinschaft;">
<meta name="citation_reference" content="citation_title=Open Source Research Software;,citation_author=Wilhelm Hasselbring;,citation_author=Leslie Carr;,citation_author=Simon Hettrick;,citation_author=Heather Packer;,citation_author=Thanassis Tiropanis;,citation_publication_date=2020-08;,citation_cover_date=2020-08;,citation_year=2020;,citation_fulltext_html_url=https://ieeexplore.ieee.org/document/9153295/;,citation_issue=8;,citation_doi=10.1109/MC.2020.2998235;,citation_issn=0018-9162, 1558-0814;,citation_volume=53;,citation_journal_title=Computer;,citation_journal_abbrev=Computer;">
<meta name="citation_reference" content="citation_title=Four Simple Recommendations to Encourage Best Practices in Research Software;,citation_abstract=Scientific research relies on computer software, yet software is not always developed following practices that ensure its quality and sustainability. This manuscript does not aim to propose new software development best practices, but rather to provide simple recommendations that encourage the adoption of existing best practices. Software development best practices promote better quality software, and better quality software improves the reproducibility and reusability of research. These recommendations are designed around Open Source values, and provide practical suggestions that contribute to making research software and its source code more discoverable, reusable and transparent. This manuscript is aimed at developers, but also at organisations, projects, journals and funders that can increase the quality and sustainability of research software by encouraging the adoption of these recommendations.;,citation_author=Rafael C. Jiménez;,citation_author=Mateusz Kuzak;,citation_author=Monther Alhamdoosh;,citation_author=Michelle Barker;,citation_author=Bérénice Batut;,citation_author=Mikael Borg;,citation_author=Salvador Capella-Gutierrez;,citation_author=Neil Chue Hong;,citation_author=Martin Cook;,citation_author=Manuel Corpas;,citation_author=Madison Flannery;,citation_author=Leyla Garcia;,citation_author=Josep Ll. Gelpí;,citation_author=Simon Gladman;,citation_author=Carole Goble;,citation_author=Montserrat González Ferreiro;,citation_author=Alejandra Gonzalez-Beltran;,citation_author=Philippa C. Griffin;,citation_author=Björn Grüning;,citation_author=Jonas Hagberg;,citation_author=Petr Holub;,citation_author=Rob Hooft;,citation_author=Jon Ison;,citation_author=Daniel S. Katz;,citation_author=Brane Leskošek;,citation_author=Federico López Gómez;,citation_author=Luis J. Oliveira;,citation_author=David Mellor;,citation_author=Rowland Mosbergen;,citation_author=Nicola Mulder;,citation_author=Yasset Perez-Riverol;,citation_author=Robert Pergl;,citation_author=Horst Pichler;,citation_author=Bernard Pope;,citation_author=Ferran Sanz;,citation_author=Maria V. Schneider;,citation_author=Victoria Stodden;,citation_author=Radosław Suchecki;,citation_author=Radka Svobodová Vařeková;,citation_author=Harry-Anton Talvik;,citation_author=Ilian Todorov;,citation_author=Andrew Treloar;,citation_author=Sonika Tyagi;,citation_author=Maarten Van Gompel;,citation_author=Daniel Vaughan;,citation_author=Allegra Via;,citation_author=Xiaochuan Wang;,citation_author=Nathan S. Watson-Haigh;,citation_author=Steve Crouch;,citation_publication_date=2017-06-13;,citation_cover_date=2017-06-13;,citation_year=2017;,citation_fulltext_html_url=https://f1000research.com/articles/6-876/v1;,citation_doi=10.12688/f1000research.11407.1;,citation_issn=2046-1402;,citation_volume=6;,citation_language=en-US;,citation_journal_title=F1000Research;,citation_journal_abbrev=F1000Res;">
<meta name="citation_reference" content="citation_title=Jupyter Notebooks a Publishing Format for Reproducible Computational Workflows;,citation_abstract=It is increasingly necessary for researchers in all fields to write computer code, and in order to reproduce research results, it is important that this code is published. We present Jupyter notebooks, a document format for publishing code, results and explanations in a form that is both readable and executable. We discuss various tools and use cases for notebook documents.;,citation_author=Thomas Kluyver;,citation_author=Benjamin Ragan-Kelley;,citation_author=Fernando Pérez;,citation_author=Brian Granger;,citation_author=Matthias Bussonnier;,citation_author=Jonathan Frederic;,citation_author=Kyle Kelley;,citation_author=Jessica Hamrick;,citation_author=Jason Grout;,citation_author=Sylvain Corlay;,citation_author=Paul Ivanov;,citation_author=Damián Avila;,citation_author=Safia Abdalla;,citation_author=Carol Willing;,citation_author=Jupyter team;,citation_editor=Fernando Loizides;,citation_editor=Birgit Scmidt;,citation_publication_date=2016;,citation_cover_date=2016;,citation_year=2016;,citation_fulltext_html_url=https://eprints.soton.ac.uk/403913/;,citation_doi=10.3233/978-1-61499-649-1-87;,citation_language=en-US;,citation_conference=IOS Press;">
<meta name="citation_reference" content="citation_title=Towards FAIR Principles for&nbsp;Research&nbsp;Software;,citation_abstract=The FAIR Guiding Principles, published in 2016, aim to improve the findability, accessibility, interoperability and reusability of digital research objects for both humans and machines. Until now the FAIR principles have been mostly applied to research data. The ideas behind these principles are, however, also directly relevant to research software. Hence there is a distinct need to explore how the FAIR principles can be applied to software. In this work, we aim to summarize the current status of the debate around FAIR and software, as basis for the development of community-agreed principles for FAIR research software in the future. We discuss what makes software different from data with regard to the application of the FAIR principles, and which desired characteristics of research software go beyond FAIR. Then we present an analysis of where the existing principles can directly be applied to software, where they need to be adapted or reinterpreted, and where the definition of additional principles is required. Here interoperability has proven to be the most challenging principle, calling for particular attention in future discussions. Finally, we outline next steps on the way towards definite FAIR principles for research software.;,citation_author=Anna-Lena Lamprecht;,citation_author=Leyla Garcia;,citation_author=Mateusz Kuzak;,citation_author=Carlos Martinez;,citation_author=Ricardo Arcila;,citation_author=Eva Martin Del Pico;,citation_author=Victoria Dominguez Del Angel;,citation_author=Stephanie Sandt;,citation_author=Jon Ison;,citation_author=Paula Andrea Martinez;,citation_author=Peter McQuilton;,citation_author=Alfonso Valencia;,citation_author=Jennifer Harrow;,citation_author=Fotis Psomopoulos;,citation_author=Josep Ll. Gelpi;,citation_author=Neil Chue Hong;,citation_author=Carole Goble;,citation_author=Salvador Capella-Gutierrez;,citation_publication_date=2020-06-12;,citation_cover_date=2020-06-12;,citation_year=2020;,citation_fulltext_html_url=https://doi.org/10.3233/DS-190026;,citation_issue=1;,citation_doi=10.3233/DS-190026;,citation_issn=2451-8484;,citation_volume=3;,citation_language=en-US;,citation_journal_title=Data Science;,citation_publisher=SAGE Publications;">
<meta name="citation_reference" content="citation_title=Ten Simple Rules for Documenting Scientific Software;,citation_author=Benjamin D. Lee;,citation_publication_date=2018-12-20;,citation_cover_date=2018-12-20;,citation_year=2018;,citation_fulltext_html_url=https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006561;,citation_issue=12;,citation_doi=10.1371/journal.pcbi.1006561;,citation_issn=1553-7358;,citation_volume=14;,citation_language=en-US;,citation_journal_title=PLOS Computational Biology;,citation_journal_abbrev=PLOS Computational Biology;,citation_publisher=Public Library of Science;">
<meta name="citation_reference" content="citation_title=Four simple recommendations to encourage best practices in research software;,citation_abstract=Scientific research relies on computer software, yet software is not always developed following practices that ensure its quality and sustainability. This manuscript does not aim to propose new software development best practices, but rather to provide simple recommendations that encourage the adoption of existing best practices. Software development best practices promote better quality software, and better quality software improves the reproducibility and reusability of research. These recommendations are designed around Open Source values, and provide practical suggestions that contribute to making research software and its source code more discoverable, reusable and transparent. This manuscript is aimed at developers, but also at organisations, projects, journals and funders that can increase the quality and sustainability of research software by encouraging the adoption of these recommendations.;,citation_author=Rafael C. Jiménez;,citation_author=Mateusz Kuzak;,citation_author=Monther Alhamdoosh;,citation_author=Michelle Barker;,citation_author=Bérénice Batut;,citation_author=Mikael Borg;,citation_author=Salvador Capella-Gutierrez;,citation_author=Neil Chue Hong;,citation_author=Martin Cook;,citation_author=Manuel Corpas;,citation_author=Madison Flannery;,citation_author=Leyla Garcia;,citation_author=Josep Ll. Gelpí;,citation_author=Simon Gladman;,citation_author=Carole Goble;,citation_author=Montserrat González Ferreiro;,citation_author=Alejandra Gonzalez-Beltran;,citation_author=Philippa C. Griffin;,citation_author=Björn Grüning;,citation_author=Jonas Hagberg;,citation_author=Petr Holub;,citation_author=Rob Hooft;,citation_author=Jon Ison;,citation_author=Daniel S. Katz;,citation_author=Brane Leskošek;,citation_author=Federico López Gómez;,citation_author=Luis J. Oliveira;,citation_author=David Mellor;,citation_author=Rowland Mosbergen;,citation_author=Nicola Mulder;,citation_author=Yasset Perez-Riverol;,citation_author=Robert Pergl;,citation_author=Horst Pichler;,citation_author=Bernard Pope;,citation_author=Ferran Sanz;,citation_author=Maria V. Schneider;,citation_author=Victoria Stodden;,citation_author=Radosław Suchecki;,citation_author=Radka Svobodová Vařeková;,citation_author=Harry-Anton Talvik;,citation_author=Ilian Todorov;,citation_author=Andrew Treloar;,citation_author=Sonika Tyagi;,citation_author=Maarten Van Gompel;,citation_author=Daniel Vaughan;,citation_author=Allegra Via;,citation_author=Xiaochuan Wang;,citation_author=Nathan S. Watson-Haigh;,citation_author=Steve Crouch;,citation_publication_date=2017-06-13;,citation_cover_date=2017-06-13;,citation_year=2017;,citation_fulltext_html_url=https://f1000research.com/articles/6-876/v1;,citation_doi=10.12688/f1000research.11407.1;,citation_issn=2046-1402;,citation_volume=6;,citation_language=en-US;,citation_journal_title=F1000Research;,citation_journal_abbrev=F1000Res;">
<meta name="citation_reference" content="citation_title=Jupyter Notebooks a publishing format for reproducible computational workflows;,citation_abstract=It is increasingly necessary for researchers in all fields to write computer code, and in order to reproduce research results, it is important that this code is published. We present Jupyter notebooks, a document format for publishing code, results and explanations in a form that is both readable and executable. We discuss various tools and use cases for notebook documents.;,citation_author=Thomas Kluyver;,citation_author=Benjamin Ragan-Kelley;,citation_author=Fernando Pérez;,citation_author=Brian Granger;,citation_author=Matthias Bussonnier;,citation_author=Jonathan Frederic;,citation_author=Kyle Kelley;,citation_author=Jessica Hamrick;,citation_author=Jason Grout;,citation_author=Sylvain Corlay;,citation_author=Paul Ivanov;,citation_author=Damián Avila;,citation_author=Safia Abdalla;,citation_author=Carol Willing;,citation_author=Jupyter team;,citation_editor=Fernando Loizides;,citation_editor=Birgit Scmidt;,citation_publication_date=2016;,citation_cover_date=2016;,citation_year=2016;,citation_fulltext_html_url=https://eprints.soton.ac.uk/403913/;,citation_doi=10.3233/978-1-61499-649-1-87;,citation_language=en-US;,citation_conference=IOS Press;">
<meta name="citation_reference" content="citation_title=Towards FAIR principles for&nbsp;research&nbsp;software;,citation_abstract=The FAIR Guiding Principles, published in 2016, aim to improve the findability, accessibility, interoperability and reusability of digital research objects for both humans and machines. Until now the FAIR principles have been mostly applied to research data. The ideas behind these principles are, however, also directly relevant to research software. Hence there is a distinct need to explore how the FAIR principles can be applied to software. In this work, we aim to summarize the current status of the debate around FAIR and software, as basis for the development of community-agreed principles for FAIR research software in the future. We discuss what makes software different from data with regard to the application of the FAIR principles, and which desired characteristics of research software go beyond FAIR. Then we present an analysis of where the existing principles can directly be applied to software, where they need to be adapted or reinterpreted, and where the definition of additional principles is required. Here interoperability has proven to be the most challenging principle, calling for particular attention in future discussions. Finally, we outline next steps on the way towards definite FAIR principles for research software.;,citation_author=Anna-Lena Lamprecht;,citation_author=Leyla Garcia;,citation_author=Mateusz Kuzak;,citation_author=Carlos Martinez;,citation_author=Ricardo Arcila;,citation_author=Eva Martin Del Pico;,citation_author=Victoria Dominguez Del Angel;,citation_author=Stephanie Sandt;,citation_author=Jon Ison;,citation_author=Paula Andrea Martinez;,citation_author=Peter McQuilton;,citation_author=Alfonso Valencia;,citation_author=Jennifer Harrow;,citation_author=Fotis Psomopoulos;,citation_author=Josep Ll. Gelpi;,citation_author=Neil Chue Hong;,citation_author=Carole Goble;,citation_author=Salvador Capella-Gutierrez;,citation_publication_date=2020-06-12;,citation_cover_date=2020-06-12;,citation_year=2020;,citation_fulltext_html_url=https://doi.org/10.3233/DS-190026;,citation_issue=1;,citation_doi=10.3233/DS-190026;,citation_issn=2451-8484;,citation_volume=3;,citation_language=en-US;,citation_journal_title=Data Science;,citation_publisher=SAGE Publications;">
<meta name="citation_reference" content="citation_title=Ten simple rules for documenting scientific software;,citation_author=Benjamin D. Lee;,citation_publication_date=2018-12-20;,citation_cover_date=2018-12-20;,citation_year=2018;,citation_fulltext_html_url=https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006561;,citation_issue=12;,citation_doi=10.1371/journal.pcbi.1006561;,citation_issn=1553-7358;,citation_volume=14;,citation_language=en-US;,citation_journal_title=PLOS Computational Biology;,citation_journal_abbrev=PLOS Computational Biology;,citation_publisher=Public Library of Science;">
<meta name="citation_reference" content="citation_title=Ten Simple Rules for the Open Development of Scientific Software;,citation_author=Andreas Prlić;,citation_author=James B. Procter;,citation_publication_date=2012-12-06;,citation_cover_date=2012-12-06;,citation_year=2012;,citation_fulltext_html_url=https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002802;,citation_issue=12;,citation_doi=10.1371/journal.pcbi.1002802;,citation_issn=1553-7358;,citation_volume=8;,citation_language=en-US;,citation_journal_title=PLOS Computational Biology;,citation_journal_abbrev=PLOS Computational Biology;,citation_publisher=Public Library of Science;">
<meta name="citation_reference" content="citation_title=Software Citation Principles;,citation_abstract=Software is a critical part of modern research and yet there is little support across the scholarly ecosystem for its acknowledgement and citation. Inspired by the activities of the FORCE11 working group focused on data citation, this document summarizes the recommendations of the FORCE11 Software Citation Working Group and its activities between June 2015 and April 2016. Based on a review of existing community practices, the goal of the working group was to produce a consolidated set of citation principles that may encourage broad adoption of a consistent policy for software citation across disciplines and venues. Our work is presented here as a set of software citation principles, a discussion of the motivations for developing the principles, reviews of existing community practice, and a discussion of the requirements these principles would place upon different stakeholders. Working examples and possible technical solutions for how these principles can be implemented will be discussed in a separate paper.;,citation_author=Arfon M. Smith;,citation_author=Daniel S. Katz;,citation_author=Kyle E. Niemeyer;,citation_publication_date=2016;,citation_cover_date=2016;,citation_year=2016;,citation_fulltext_html_url=https://peerj.com/articles/cs-86;,citation_doi=10.7717/peerj-cs.86;,citation_issn=2376-5992;,citation_volume=2;,citation_language=en-US;,citation_journal_title=PeerJ Computer Science;,citation_journal_abbrev=PeerJ Comput. Sci.;,citation_publisher=PeerJ Inc.;">
<meta name="citation_reference" content="citation_title=Good Enough Practices in Scientific Computing;,citation_abstract=Author summary Computers are now essential in all branches of science, but most researchers are never taught the equivalent of basic lab skills for research computing. As a result, data can get lost, analyses can take much longer than necessary, and researchers are limited in how effectively they can work with software and data. Computing workflows need to follow the same practices as lab projects and notebooks, with organized data, documented steps, and the project structured for reproducibility, but researchers new to computing often dont know where to start. This paper presents a set of good computing practices that every researcher can adopt, regardless of their current level of computational skill. These practices, which encompass data management, programming, collaborating with colleagues, organizing projects, tracking work, and writing manuscripts, are drawn from a wide variety of published sources from our daily lives and from our work with volunteer organizations that have delivered workshops to over 11,000 people since 2010.;,citation_author=Greg Wilson;,citation_author=Jennifer Bryan;,citation_author=Karen Cranston;,citation_author=Justin Kitzes;,citation_author=Lex Nederbragt;,citation_author=Tracy K. Teal;,citation_publication_date=2017-06-22;,citation_cover_date=2017-06-22;,citation_year=2017;,citation_fulltext_html_url=https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005510;,citation_issue=6;,citation_doi=10.1371/journal.pcbi.1005510;,citation_issn=1553-7358;,citation_volume=13;,citation_language=en-US;,citation_journal_title=PLOS Computational Biology;,citation_journal_abbrev=PLOS Computational Biology;,citation_publisher=Public Library of Science;">
<meta name="citation_reference" content="citation_title=Software citation principles;,citation_abstract=Software is a critical part of modern research and yet there is little support across the scholarly ecosystem for its acknowledgement and citation. Inspired by the activities of the FORCE11 working group focused on data citation, this document summarizes the recommendations of the FORCE11 Software Citation Working Group and its activities between June 2015 and April 2016. Based on a review of existing community practices, the goal of the working group was to produce a consolidated set of citation principles that may encourage broad adoption of a consistent policy for software citation across disciplines and venues. Our work is presented here as a set of software citation principles, a discussion of the motivations for developing the principles, reviews of existing community practice, and a discussion of the requirements these principles would place upon different stakeholders. Working examples and possible technical solutions for how these principles can be implemented will be discussed in a separate paper.;,citation_author=Arfon M. Smith;,citation_author=Daniel S. Katz;,citation_author=Kyle E. Niemeyer;,citation_publication_date=2016;,citation_cover_date=2016;,citation_year=2016;,citation_fulltext_html_url=https://peerj.com/articles/cs-86;,citation_doi=10.7717/peerj-cs.86;,citation_issn=2376-5992;,citation_volume=2;,citation_language=en-US;,citation_journal_title=PeerJ Computer Science;,citation_journal_abbrev=PeerJ Comput. Sci.;,citation_publisher=PeerJ Inc.;">
<meta name="citation_reference" content="citation_title=Good enough practices in scientific computing;,citation_abstract=Author summary Computers are now essential in all branches of science, but most researchers are never taught the equivalent of basic lab skills for research computing. As a result, data can get lost, analyses can take much longer than necessary, and researchers are limited in how effectively they can work with software and data. Computing workflows need to follow the same practices as lab projects and notebooks, with organized data, documented steps, and the project structured for reproducibility, but researchers new to computing often dont know where to start. This paper presents a set of good computing practices that every researcher can adopt, regardless of their current level of computational skill. These practices, which encompass data management, programming, collaborating with colleagues, organizing projects, tracking work, and writing manuscripts, are drawn from a wide variety of published sources from our daily lives and from our work with volunteer organizations that have delivered workshops to over 11,000 people since 2010.;,citation_author=Greg Wilson;,citation_author=Jennifer Bryan;,citation_author=Karen Cranston;,citation_author=Justin Kitzes;,citation_author=Lex Nederbragt;,citation_author=Tracy K. Teal;,citation_publication_date=2017-06-22;,citation_cover_date=2017-06-22;,citation_year=2017;,citation_fulltext_html_url=https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005510;,citation_issue=6;,citation_doi=10.1371/journal.pcbi.1005510;,citation_issn=1553-7358;,citation_volume=13;,citation_language=en-US;,citation_journal_title=PLOS Computational Biology;,citation_journal_abbrev=PLOS Computational Biology;,citation_publisher=Public Library of Science;">
</head>
<body class="nav-sidebar docked nav-fixed slimcontent quarto-light"><script id="quarto-html-before-body" type="application/javascript">
@ -148,7 +150,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -181,7 +183,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -221,7 +223,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -249,7 +251,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -272,17 +274,20 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -293,7 +298,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -305,6 +310,8 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -316,12 +323,12 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -359,6 +366,10 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -402,12 +413,6 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -815,7 +820,7 @@ Nutzer*innen zu helfen, die theoretischen Grundlagen nachvollziehbar zu machen.
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Zusammengefasst sollte die Dokumentation alle <strong>W-Fragen</strong> beantworten
<span class="screen-reader-only">Wichtig</span>Zusammengefasst sollte die Dokumentation alle <strong>W-Fragen</strong> beantworten
</div>
</div>
<div class="callout-body-container callout-body">
@ -857,7 +862,7 @@ Zusammengefasst sollte die Dokumentation alle <strong>W-Fragen</strong> beantwor
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -908,7 +913,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -926,7 +931,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -936,12 +941,12 @@ Prinzip
<p>Achten Sie dabei auf Dateigrößen und Formate (Bilder als PNG/JPG, Diagramme wenn möglich als SVG für Langlebigkeit). Falls Diagramme der Architektur oder Workflow-Abbildungen hilfreich sind, können diese mit simplen Mitteln erstellt werden<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a>.</p>
<div class="no-row-height column-margin column-container"><div id="fn3"><p><sup>3</sup>&nbsp;zur Not handgezeichnet und abfotografiert, besser jedoch mit Tools wie <a href="https://mermaid.js.org/" title="Sprache für Diagramme; kann automatisiert (z.b. durch pandoc, javascript im HTML, …) in Bilder gewandelt werden">mermaid.js</a> Diagrammen in <a href="https://en.wikipedia.org/wiki/Markdown" title="Mittlerweile DER Standard bei plaintext-Dokumenten">Markdown</a> oder <a href="https://graphviz.org/" title="Textuelle darstellung von Graphen; Standard-Unix-Tool; Auf vielen Systemen verfügbar und rendert zu pdf/svg">graphviz</a></p></div></div><p>Diese Visualisierungen sind jedoch nur dann einzusetzen, wenn sie echten Mehrwert bieten und ohne komplexe Build-Prozesse eingebunden werden können. Im Zweifel hat textuelle Beschreibung Vorrang, um nicht vom <strong>Prinzip “keep it simple”</strong> abzuweichen.</p>
<div class="callout callout-style-default callout-note callout-titled" title="Typische Nutzungsszenarien und Workflows">
<div class="callout-header d-flex align-content-center" data-bs-toggle="collapse" data-bs-target=".callout-5-contents" aria-controls="callout-5" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-header d-flex align-content-center collapsed" data-bs-toggle="collapse" data-bs-target=".callout-5-contents" aria-controls="callout-5" aria-expanded="false" aria-label="Toggle callout">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Typische Nutzungsszenarien und Workflows
<span class="screen-reader-only">Hinweis</span>Typische Nutzungsszenarien und Workflows
</div>
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
</div>
@ -963,7 +968,7 @@ Typische Nutzungsszenarien und Workflows
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -1036,7 +1041,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
FAIR4RS-Prinzipien für Software
<span class="screen-reader-only">Hinweis</span>FAIR4RS-Prinzipien für Software
</div>
</div>
<div class="callout-body-container callout-body">
@ -1048,7 +1053,7 @@ FAIR4RS-Prinzipien für Software
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
ENDINGS-Prinzipien
<span class="screen-reader-only">Hinweis</span>ENDINGS-Prinzipien
</div>
</div>
<div class="callout-body-container callout-body">
@ -1101,7 +1106,7 @@ ENDINGS-Prinzipien
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Vorsicht bei Python-Notebooks
<span class="screen-reader-only">Warnung</span>Vorsicht bei Python-Notebooks
</div>
</div>
<div class="callout-body-container callout-body">
@ -1124,7 +1129,7 @@ Vorsicht bei Python-Notebooks
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -1147,7 +1152,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -1167,7 +1172,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Prinzip
<span class="screen-reader-only">Tipp</span>Prinzip
</div>
</div>
<div class="callout-body-container callout-body">
@ -1205,7 +1210,7 @@ Prinzip
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
TODO
<span class="screen-reader-only">Wichtig</span>TODO
</div>
</div>
<div class="callout-body-container callout-body">
@ -1399,7 +1404,7 @@ Dresselhaus, Nicole, and GPT-4.5 deep research. 2025.
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -88,17 +88,19 @@ div.csl-indent {
<meta name="quarto:offset" content="../">
<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="../site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="../site_libs/quarto-html/popper.min.js"></script>
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="../site_libs/quarto-html/anchor.min.js"></script>
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="../site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="../site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="../site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -167,11 +169,11 @@ maintaining data privacy and reproducibility.
<meta name="citation_online_date" content="2025-05-05">
<meta name="citation_fulltext_html_url" content="https://drezil.de/Writing/ner4all-case-study.html">
<meta name="citation_language" content="en">
<meta name="citation_reference" content="citation_title=NER4all or Context is All You Need: Using LLMs for low-effort, high-performance NER on historical texts. A humanities informed approach;,citation_author=Torsten Hiltmann;,citation_author=Martin Dröge;,citation_author=Nicole Dresselhaus;,citation_author=Till Grallert;,citation_author=Melanie Althage;,citation_author=Paul Bayer;,citation_author=Sophie Eckenstaler;,citation_author=Koray Mendi;,citation_author=Jascha Marijn Schmitz;,citation_author=Philipp Schneider;,citation_author=Wiebke Sczeponik;,citation_author=Anica Skibba;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://arxiv.org/abs/2502.04351;">
<meta name="citation_reference" content="citation_title=NER4all or context is all you need: Using LLMs for low-effort, high-performance NER on historical texts. A humanities informed approach;,citation_author=Torsten Hiltmann;,citation_author=Martin Dröge;,citation_author=Nicole Dresselhaus;,citation_author=Till Grallert;,citation_author=Melanie Althage;,citation_author=Paul Bayer;,citation_author=Sophie Eckenstaler;,citation_author=Koray Mendi;,citation_author=Jascha Marijn Schmitz;,citation_author=Philipp Schneider;,citation_author=Wiebke Sczeponik;,citation_author=Anica Skibba;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://arxiv.org/abs/2502.04351;">
<meta name="citation_reference" content="citation_title=Run LLMs locally: 5 best methods (+ self-hosted AI starter kit);,citation_author=Mihai Farcas;,citation_publication_date=2024;,citation_cover_date=2024;,citation_year=2024;,citation_fulltext_html_url=https://blog.n8n.io/local-llm/;">
<meta name="citation_reference" content="citation_title=Tutorial on How to Integrate DeepSeek-R1 and the n8n Agent Development Framework;,citation_author=Aleksandar Haber;,citation_publication_date=2025-02-23;,citation_cover_date=2025-02-23;,citation_year=2025;,citation_fulltext_html_url=https://aleksandarhaber.com/tutorial-on-how-to-develop-private-and-secure-local-ai-agents-using-deepseek-r1-and-the-n8n-agent-development-framework/;">
<meta name="citation_reference" content="citation_title=DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning;,citation_author=undefined DeepSeek-AI;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://arxiv.org/abs/2501.12948;">
<meta name="citation_reference" content="citation_title=Cogito v1 Preview - Introducing IDA as a path to general superintelligence;,citation_author=Deep Cogito;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://www.deepcogito.com/research/cogito-v1-preview;">
<meta name="citation_reference" content="citation_title=Tutorial on how to integrate DeepSeek-R1 and the n8n agent development framework;,citation_author=Aleksandar Haber;,citation_publication_date=2025-02-23;,citation_cover_date=2025-02-23;,citation_year=2025;,citation_fulltext_html_url=https://aleksandarhaber.com/tutorial-on-how-to-develop-private-and-secure-local-ai-agents-using-deepseek-r1-and-the-n8n-agent-development-framework/;">
<meta name="citation_reference" content="citation_title=DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning;,citation_author=undefined DeepSeek-AI;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://arxiv.org/abs/2501.12948;">
<meta name="citation_reference" content="citation_title=Cogito v1 preview - introducing IDA as a path to general superintelligence;,citation_author=Deep Cogito;,citation_publication_date=2025;,citation_cover_date=2025;,citation_year=2025;,citation_fulltext_html_url=https://www.deepcogito.com/research/cogito-v1-preview;">
</head>
<body class="nav-sidebar docked nav-fixed quarto-light"><script id="quarto-html-before-body" type="application/javascript">
@ -192,7 +194,7 @@ maintaining data privacy and reproducibility.
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -225,7 +227,7 @@ maintaining data privacy and reproducibility.
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -265,7 +267,7 @@ maintaining data privacy and reproducibility.
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -293,7 +295,7 @@ maintaining data privacy and reproducibility.
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -316,17 +318,20 @@ maintaining data privacy and reproducibility.
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -337,7 +342,7 @@ maintaining data privacy and reproducibility.
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -349,6 +354,8 @@ maintaining data privacy and reproducibility.
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="../index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="../index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -360,12 +367,12 @@ maintaining data privacy and reproducibility.
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-nav-scroll me-auto">
<li class="nav-item">
<a class="nav-link" href="../index.html"> <i class="bi bi-house" role="img">
<a class="nav-link active" href="../index.html" aria-current="page"> <i class="bi bi-house" role="img">
</i>
<span class="menu-text">Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link active" href="../About/index.html" aria-current="page"> <i class="bi bi-file-person" role="img">
<a class="nav-link" href="../About/index.html"> <i class="bi bi-file-person" role="img">
</i>
<span class="menu-text">About</span></a>
</li>
@ -403,6 +410,10 @@ maintaining data privacy and reproducibility.
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="../index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -446,12 +457,6 @@ maintaining data privacy and reproducibility.
<a href="../Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -801,21 +806,21 @@ maintaining data privacy and reproducibility.
<p>To reproduce this solution, you will need a machine with an <strong>NVIDIA GPU</strong> and the following software components installed:</p>
<ul>
<li><p><strong>n8n (v1.</strong>x** or later)** the workflow automation tool. You can install n8n via npm, Docker, or use the desktop app. For a server environment, Docker is convenient. For example, to run n8n with Docker:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">-it</span> <span class="at">--rm</span> <span class="dt">\</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">-it</span> <span class="at">--rm</span> <span class="dt">\</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="at">-p</span> 5678:5678 <span class="dt">\</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="at">-v</span> ~/.n8n:/home/node/.n8n <span class="dt">\</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> n8nio/n8n:latest</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> n8nio/n8n:latest</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>This exposes n8n on <code>http://localhost:5678</code> for the web interface. (If you use Docker and plan to connect to a host-running Ollama, start the container with <code>--network=host</code> to allow access to the Ollama API on localhost.)</p></li>
<li><p><strong>Ollama (v0.x*)</strong> an LLM runtime that serves models via an HTTP API. Installing Ollama is straightforward: download the installer for your OS from the official site (Linux users can run the one-line script <code>curl -sSL https://ollama.com/install.sh | sh</code>). After installation, start the Ollama server (daemon) by running:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> serve</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> serve</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>This will launch the service listening on port 11434. You can verify its running by opening <code>http://localhost:11434</code> in a browser it should respond with “Ollama is running”. <em>Note:</em> Ensure your system has recent NVIDIA drivers and CUDA support if using GPU. Ollama supports NVIDIA GPUs with compute capability ≥5.0 (the A100 is well above this). Use <code>nvidia-smi</code> to confirm your GPU is recognized. If everything is set up, Ollama will automatically use the GPU for model inference (falling back to CPU if none available).</p></li>
<li><p><strong>LLM Model (14B class):</strong> Finally, download at least one large language model to use for NER. You have a few options here, and you can “pull” them via Ollamas CLI:</p>
<ul>
<li><p><em>DeepSeek-R1 14B:</em> A 14.8B-parameter model distilled from larger reasoning models (based on Qwen architecture). Its optimized for reasoning tasks and compares to OpenAIs models in quality. Pull it with:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> pull deepseek-r1:14b</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> pull deepseek-r1:14b</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>This downloads ~9 GB of data (the quantized weights). If you have a very strong GPU (e.g.&nbsp;A100 80GB), you could even try <code>deepseek-r1:70b</code> (~43 GB), but 14B is a good balance for our use-case. DeepSeek-R1 is licensed MIT and designed to run locally with no restrictions.</p></li>
<li><p><em>Cogito 14B:</em> A 14B “hybrid reasoning” model by Deep Cogito, known for excellent instruction-following and multilingual capability. Pull it with:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> pull cogito:14b</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ollama</span> pull cogito:14b</span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Cogito-14B is also ~9 GB (quantized) and supports an extended context window up to <strong>128k tokens</strong> which is extremely useful if you plan to analyze very long documents without chunking. Its trained in 30+ languages and tuned to follow complex instructions, which can help in structured output tasks like ours.</p></li>
<li><p><em>Others:</em> Ollama offers many models (LLaMA 2 variants, Mistral, etc.). For instance, <code>ollama pull llama2:13b</code> would get a LLaMA-2 13B model. These can work, but for best results in NER with no fine-tuning, we suggest using one of the above well-instructed models. If your hardware is limited, you could try a 7-8B model (e.g., <code>deepseek-r1:7b</code> or <code>cogito:8b</code>), which download faster and use ~45 GB VRAM, at the cost of some accuracy. In CPU-only scenarios, even a 1.5B model is available it will run very slowly and likely miss more entities, but it proves the pipeline can work on minimal hardware.</p></li>
</ul></li>
@ -828,10 +833,10 @@ maintaining data privacy and reproducibility.
<section id="webhook-input-for-entities-and-text" class="level3">
<h3 class="anchored" data-anchor-id="webhook-input-for-entities-and-text">1. Webhook Input for Entities and Text</h3>
<p>Start by creating a <strong>Webhook trigger</strong> node in n8n. This will provide a URL (endpoint) that you can send a request to. Configure it to accept a POST request containing the necessary inputs. For example, we expect the request JSON to look like:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5"><pre class="sourceCode json code-with-copy"><code class="sourceCode json"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"entities"</span><span class="fu">:</span> <span class="st">"PER, ORG, LOC"</span><span class="fu">,</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"text"</span><span class="fu">:</span> <span class="st">"John Doe visited Berlin in 1921 and met with the Board of Acme Corp."</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></div>
<p>Here, <code>"entities"</code> is a simple comma-separated string of entity types (you could also accept an array or a more detailed schema; for simplicity we use the format used in the paper: PER for person, LOC for location, ORG for organization). The <code>"text"</code> field contains the content to analyze. In a real scenario, the text could be much longer or might be sent as a file. If its a file, one approach is to send it as form-data and use n8ns <strong>Read Binary File</strong> + <strong>Move Binary Data</strong> nodes to get it into text form. Alternatively, send a URL in the JSON and use an HTTP Request node in the workflow to fetch the content. The key is that by the end of this step, we have the raw text and the list of entity labels available in the n8n workflow as variables.</p>
</section>
<section id="constructing-the-llm-prompt" class="level3">
@ -983,7 +988,7 @@ LLM-Based NER with N8n and Ollama.”</span> May 5, 2025. <a href="https://drezi
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

224
dist/index.html vendored
View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.23">
<meta name="generator" content="quarto-1.8.17">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@ -34,17 +34,19 @@ ul.task-list li input[type="checkbox"] {
<script src="site_libs/quarto-listing/quarto-listing.js"></script>
<script src="site_libs/quarto-html/quarto.js" type="module"></script>
<script src="site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="site_libs/quarto-html/axe/axe-check.js" type="module"></script>
<script src="site_libs/quarto-html/popper.min.js"></script>
<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
<script src="site_libs/quarto-html/anchor.min.js"></script>
<link href="site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark-2c84ecb840a13f4c7993f9e5648f0c14.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-6cf5824034cebd0380a5b9c74c43f006.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark-04b38c9dba5d7c0f1fe2b621b39e7e62.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
<link href="site_libs/quarto-html/quarto-syntax-highlighting-ff1c8a91a872873ab9706226229f9e30.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
<script src="site_libs/bootstrap/bootstrap.min.js"></script>
<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="site_libs/bootstrap/bootstrap-dark-716ed94a23403968eaa6fe981e0cbf91.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="site_libs/bootstrap/bootstrap-ec71cb1e120c0dd41819aca960e74e38.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<link href="site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
<link href="site_libs/bootstrap/bootstrap-dark-3c8015a3c2181875b3e8a350495bd83c.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
<link href="site_libs/bootstrap/bootstrap-9b56b6674ace31b1957ea5f5ef42286f.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
<script id="quarto-search-options" type="application/json">{
"location": "navbar",
"copy-button": false,
@ -116,7 +118,7 @@ const typesetMath = (el) => {
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
if (mathElements[i].tagName == "SPAN" && texText && texText.data) {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
@ -158,7 +160,7 @@ window.Quarto = {
toggleBodyColorMode(bsSheetEl);
}
}
window.setColorSchemeToggle = (alternate) => {
const setColorSchemeToggle = (alternate) => {
const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
for (let i=0; i < toggles.length; i++) {
const toggle = toggles[i];
@ -191,7 +193,7 @@ window.Quarto = {
}
manageTransitions('#quarto-margin-sidebar .nav-link', true);
// Switch the toggles
window.setColorSchemeToggle(alternate)
setColorSchemeToggle(alternate)
// Hack to workaround the fact that safari doesn't
// properly recolor the scrollbar when toggling (#1455)
if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
@ -231,7 +233,7 @@ window.Quarto = {
const isFileUrl = () => {
return window.location.protocol === 'file:';
}
window.hasAlternateSentinel = () => {
const hasAlternateSentinel = () => {
let styleSentinel = getColorSchemeSentinel();
if (styleSentinel !== null) {
return styleSentinel === "alternate";
@ -259,7 +261,7 @@ window.Quarto = {
const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
let newTheme = '';
if(darkModeDefault) {
if(authorPrefersDark) {
newTheme = isAlternate ? baseTheme : alternateTheme;
} else {
newTheme = isAlternate ? alternateTheme : baseTheme;
@ -282,17 +284,20 @@ window.Quarto = {
changeGiscusTheme();
}
};
const authorPrefersDark = false;
const queryPrefersDark = window.matchMedia('(prefers-color-scheme: dark)');
const darkModeDefault = queryPrefersDark.matches;
document.querySelector('link.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
// Dark / light mode switch
window.quartoToggleColorScheme = () => {
// Read the current dark / light value
let toAlternate = !window.hasAlternateSentinel();
let toAlternate = !hasAlternateSentinel();
toggleColorMode(toAlternate);
setStyleSentinel(toAlternate);
toggleGiscusIfUsed(toAlternate, darkModeDefault);
window.dispatchEvent(new Event('resize'));
};
queryPrefersDark.addEventListener("change", e => {
if(window.localStorage.getItem("quarto-color-scheme") !== null)
@ -303,7 +308,7 @@ window.Quarto = {
toggleGiscusIfUsed(alternate, darkModeDefault);
});
// Switch to dark mode if need be
if (window.hasAlternateSentinel()) {
if (hasAlternateSentinel()) {
toggleColorMode(true);
} else {
toggleColorMode(false);
@ -315,6 +320,8 @@ window.Quarto = {
<nav class="navbar navbar-expand-lg " data-bs-theme="dark">
<div class="navbar-container container-fluid">
<div class="navbar-brand-container mx-auto">
<a href="./index.html" class="navbar-brand navbar-brand-logo">
</a>
<a class="navbar-brand" href="./index.html">
<span class="navbar-title">Nicole Dresselhaus</span>
</a>
@ -369,6 +376,10 @@ window.Quarto = {
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
<!-- sidebar -->
<nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation docked overflow-auto">
<div class="pt-lg-2 mt-2 text-left sidebar-header">
<a href="./index.html" class="sidebar-logo-link">
</a>
</div>
<div class="sidebar-menu-container">
<ul class="list-unstyled mt-1">
<li class="sidebar-item sidebar-item-section">
@ -412,12 +423,6 @@ window.Quarto = {
<a href="./Writing/Obsidian-RAG.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">RAG für eine Obsidian-Wissensdatenbank: Technische Ansätze</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./Obsidian-Articles/Artikelbewertung durch LLM.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis</span></a>
</div>
</li>
</ul>
</li>
@ -649,7 +654,7 @@ window.Quarto = {
<li><a href="#letzte-posts" id="toc-letzte-posts" class="nav-link active" data-scroll-target="#letzte-posts">Letzte Posts</a></li>
</ul>
<div class="quarto-other-links"><h2>Other Links</h2><ul><li><a href="https://gitea.dresselhaus.cloud/Drezil" rel="me"><i class="bi bi-cup-hot-fill"></i>Gitea</a></li><li><a href="https://toot.kif.rocks/@Drezil" rel="me"><i class="bi bi-mastodon"></i>Mastodon</a></li><li><a href="https://github.com/Drezil" rel="me"><i class="bi bi-github"></i>Github</a></li></ul></div></nav>
<h5 class="quarto-listing-category-title">Categories</h5><div class="quarto-listing-category category-cloud"><div class="category" data-category="QXJjaGl2ZWQ="><span class="quarto-category-count category-cloud-2">Archived</span></div><div class="category" data-category="QXJ0aWNsZQ=="><span class="quarto-category-count category-cloud-5">Article</span></div><div class="category" data-category="QmVpc3BpZWw="><span class="quarto-category-count category-cloud-1">Beispiel</span></div><div class="category" data-category="QmVzdCUyMFByYWN0aWNlcw=="><span class="quarto-category-count category-cloud-1">Best Practices</span></div><div class="category" data-category="Q2FzZS1zdHVkeQ=="><span class="quarto-category-count category-cloud-1">Case-study</span></div><div class="category" data-category="Q29kZQ=="><span class="quarto-category-count category-cloud-2">Code</span></div><div class="category" data-category="RXhwZXJpZW5jZQ=="><span class="quarto-category-count category-cloud-2">Experience</span></div><div class="category" data-category="RnVu"><span class="quarto-category-count category-cloud-1">Fun</span></div><div class="category" data-category="SGFza2VsbA=="><span class="quarto-category-count category-cloud-5">Haskell</span></div><div class="category" data-category="TGVjdHVyZQ=="><span class="quarto-category-count category-cloud-1">Lecture</span></div><div class="category" data-category="TGlua3M="><span class="quarto-category-count category-cloud-1">Links</span></div><div class="category" data-category="TWVudGFsJTIwSGVhbHRo"><span class="quarto-category-count category-cloud-1">Mental Health</span></div><div class="category" data-category="TUw="><span class="quarto-category-count category-cloud-2">ML</span></div><div class="category" data-category="TkVS"><span class="quarto-category-count category-cloud-1">NER</span></div><div class="category" data-category="UHJheGlz"><span class="quarto-category-count category-cloud-1">Praxis</span></div><div class="category" data-category="UkFH"><span class="quarto-category-count category-cloud-1">RAG</span></div><div class="category" data-category="U3RydWdnbGVz"><span class="quarto-category-count category-cloud-1">Struggles</span></div><div class="category" data-category="VHV0b3JpYWw="><span class="quarto-category-count category-cloud-2">Tutorial</span></div><div class="category" data-category="VW5p"><span class="quarto-category-count category-cloud-1">Uni</span></div></div></div>
<h5 class="quarto-listing-category-title">Categories</h5><div class="quarto-listing-category category-cloud"><div class="category" data-category="QXJjaGl2ZWQ="><span class="quarto-category-count category-cloud-2">Archived</span></div><div class="category" data-category="QXJ0aWNsZQ=="><span class="quarto-category-count category-cloud-5">Article</span></div><div class="category" data-category="QmVzdCUyMFByYWN0aWNlcw=="><span class="quarto-category-count category-cloud-1">Best Practices</span></div><div class="category" data-category="Q2FzZS1zdHVkeQ=="><span class="quarto-category-count category-cloud-1">Case-study</span></div><div class="category" data-category="Q29kZQ=="><span class="quarto-category-count category-cloud-2">Code</span></div><div class="category" data-category="RXhwZXJpZW5jZQ=="><span class="quarto-category-count category-cloud-1">Experience</span></div><div class="category" data-category="RnVu"><span class="quarto-category-count category-cloud-1">Fun</span></div><div class="category" data-category="SGFza2VsbA=="><span class="quarto-category-count category-cloud-6">Haskell</span></div><div class="category" data-category="TGVjdHVyZQ=="><span class="quarto-category-count category-cloud-1">Lecture</span></div><div class="category" data-category="TGlua3M="><span class="quarto-category-count category-cloud-1">Links</span></div><div class="category" data-category="TWVudGFsJTIwSGVhbHRo"><span class="quarto-category-count category-cloud-1">Mental Health</span></div><div class="category" data-category="TUw="><span class="quarto-category-count category-cloud-2">ML</span></div><div class="category" data-category="TkVS"><span class="quarto-category-count category-cloud-1">NER</span></div><div class="category" data-category="UkFH"><span class="quarto-category-count category-cloud-1">RAG</span></div><div class="category" data-category="U3RydWdnbGVz"><span class="quarto-category-count category-cloud-1">Struggles</span></div><div class="category" data-category="VHV0b3JpYWw="><span class="quarto-category-count category-cloud-2">Tutorial</span></div><div class="category" data-category="VW5p"><span class="quarto-category-count category-cloud-1">Uni</span></div></div></div>
<!-- main -->
<main class="content" id="quarto-document-content">
@ -684,7 +689,7 @@ window.Quarto = {
<div class="quarto-listing quarto-listing-container-grid" id="listing-listing">
<div class="list grid quarto-listing-cols-3">
<div class="g-col-1" data-index="0" data-listing-date-sort="1750888800000" data-listing-file-modified-sort="1751197563135" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="30" data-listing-word-count-sort="5905">
<div class="g-col-1" data-index="0" data-listing-date-sort="1750888800000" data-listing-file-modified-sort="1753959054486" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="30" data-listing-word-count-sort="5905">
<a href="./Writing/coding-age-ai.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
@ -708,40 +713,7 @@ June 26, 2025
</div>
</div></a>
</div>
<div class="g-col-1" data-index="1" data-categories="UHJheGlzJTJDQmVpc3BpZWwlMkNNTCUyQ0V4cGVyaWVuY2U=" data-listing-date-sort="1749765600000" data-listing-file-modified-sort="1749802901581" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="3" data-listing-word-count-sort="443">
<a href="./Obsidian-Articles/Artikelbewertung durch LLM.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
<div class="card-body post-contents">
<h5 class="no-anchor card-title listing-title">
Artikelbewertung durch ein Large Language Model (LLM) - Ein Beispiel aus der Praxis
</h5>
<div class="listing-categories">
<div class="listing-category" onclick="window.quartoListingCategory('UHJheGlz'); return false;">Praxis</div>
<div class="listing-category" onclick="window.quartoListingCategory('QmVpc3BpZWw='); return false;">Beispiel</div>
<div class="listing-category" onclick="window.quartoListingCategory('TUw='); return false;">ML</div>
<div class="listing-category" onclick="window.quartoListingCategory('RXhwZXJpZW5jZQ=='); return false;">Experience</div>
</div>
<div class="card-text listing-description delink">
<p>Aktuelle Wege ein LLM dazu zu “motivieren”, was man möchte.</p>
</div>
<div class="card-attribution card-text-small justify">
<div class="listing-author">
</div>
<div class="listing-date">
June 13, 2025
</div>
</div>
</div>
</div></a>
</div>
<div class="g-col-1" data-index="2" data-categories="QXJ0aWNsZSUyQ0Jlc3QlMjBQcmFjdGljZXM=" data-listing-date-sort="1749074400000" data-listing-file-modified-sort="1749143901768" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="30" data-listing-word-count-sort="5903">
<div class="g-col-1" data-index="1" data-categories="QXJ0aWNsZSUyQ0Jlc3QlMjBQcmFjdGljZXM=" data-listing-date-sort="1749074400000" data-listing-file-modified-sort="1752960634934" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="30" data-listing-word-count-sort="5903">
<a href="./Writing/documentation.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
@ -772,7 +744,7 @@ June 5, 2025
</div>
</div></a>
</div>
<div class="g-col-1" data-index="3" data-categories="QXJ0aWNsZSUyQ0Nhc2Utc3R1ZHklMkNNTCUyQ05FUg==" data-listing-date-sort="1746396000000" data-listing-file-modified-sort="1749128792542" data-listing-date-modified-sort="1746741600000" data-listing-reading-time-sort="28" data-listing-word-count-sort="5411">
<div class="g-col-1" data-index="2" data-categories="QXJ0aWNsZSUyQ0Nhc2Utc3R1ZHklMkNNTCUyQ05FUg==" data-listing-date-sort="1746396000000" data-listing-file-modified-sort="1752960634934" data-listing-date-modified-sort="1746741600000" data-listing-reading-time-sort="28" data-listing-word-count-sort="5411">
<a href="./Writing/ner4all-case-study.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
@ -807,7 +779,7 @@ May 5, 2025
</div>
</div></a>
</div>
<div class="g-col-1" data-index="4" data-categories="QXJ0aWNsZSUyQ1JBRyUyQ01M" data-listing-date-sort="1745445600000" data-listing-file-modified-sort="1746817736279" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="40" data-listing-word-count-sort="7887">
<div class="g-col-1" data-index="3" data-categories="QXJ0aWNsZSUyQ1JBRyUyQ01M" data-listing-date-sort="1745445600000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="40" data-listing-word-count-sort="7887">
<a href="./Writing/Obsidian-RAG.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top">
@ -840,7 +812,7 @@ April 24, 2025
</div>
</div></a>
</div>
<div class="g-col-1" data-index="5" data-categories="SGFza2VsbCUyQ0NvZGU=" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1746813880395" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="14" data-listing-word-count-sort="2676">
<div class="g-col-1" data-index="4" data-categories="SGFza2VsbCUyQ0NvZGU=" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="14" data-listing-word-count-sort="2676">
<a href="./Coding/Haskell/Webapp-Example/Main.hs.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -869,36 +841,7 @@ April 1, 2020
</div>
</div></a>
</div>
<div class="g-col-1" data-index="6" data-categories="SGFza2VsbCUyQ0NvZGU=" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1746813911127" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="6" data-listing-word-count-sort="1189">
<a href="./Coding/Haskell/Webapp-Example/MyService_Types.hs.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
<div class="card-body post-contents">
<h5 class="no-anchor card-title listing-title">
Webapp-Example: MyService/Types.hs
</h5>
<div class="listing-categories">
<div class="listing-category" onclick="window.quartoListingCategory('SGFza2VsbA=='); return false;">Haskell</div>
<div class="listing-category" onclick="window.quartoListingCategory('Q29kZQ=='); return false;">Code</div>
</div>
<div class="card-text listing-description delink">
Anleitung siehe Webapp-Example.
</div>
<div class="card-attribution card-text-small justify">
<div class="listing-author">
</div>
<div class="listing-date">
April 1, 2020
</div>
</div>
</div>
</div></a>
</div>
<div class="g-col-1" data-index="7" data-categories="SGFza2VsbCUyQ1R1dG9yaWFs" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1751196644156" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="28" data-listing-word-count-sort="5542">
<div class="g-col-1" data-index="5" data-categories="SGFza2VsbCUyQ1R1dG9yaWFs" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1752960634934" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="28" data-listing-word-count-sort="5542">
<a href="./Coding/Haskell/Webapp-Example/index.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -927,7 +870,36 @@ April 1, 2020
</div>
</div></a>
</div>
<div class="g-col-1" data-index="8" data-categories="TWVudGFsJTIwSGVhbHRoJTJDQXJ0aWNsZSUyQ1N0cnVnZ2xlcw==" data-listing-date-sort="1546297200000" data-listing-file-modified-sort="1746818996847" data-listing-date-modified-sort="1746741600000" data-listing-reading-time-sort="3" data-listing-word-count-sort="507">
<div class="g-col-1" data-index="6" data-categories="SGFza2VsbCUyQ0NvZGU=" data-listing-date-sort="1585692000000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="6" data-listing-word-count-sort="1189">
<a href="./Coding/Haskell/Webapp-Example/MyService_Types.hs.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
<div class="card-body post-contents">
<h5 class="no-anchor card-title listing-title">
Webapp-Example: MyService/Types.hs
</h5>
<div class="listing-categories">
<div class="listing-category" onclick="window.quartoListingCategory('SGFza2VsbA=='); return false;">Haskell</div>
<div class="listing-category" onclick="window.quartoListingCategory('Q29kZQ=='); return false;">Code</div>
</div>
<div class="card-text listing-description delink">
Anleitung siehe Webapp-Example.
</div>
<div class="card-attribution card-text-small justify">
<div class="listing-author">
</div>
<div class="listing-date">
April 1, 2020
</div>
</div>
</div>
</div></a>
</div>
<div class="g-col-1" data-index="7" data-categories="TWVudGFsJTIwSGVhbHRoJTJDQXJ0aWNsZSUyQ1N0cnVnZ2xlcw==" data-listing-date-sort="1546297200000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="1746741600000" data-listing-reading-time-sort="3" data-listing-word-count-sort="507">
<a href="./Health/Issues.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -958,7 +930,36 @@ January 1, 2019
</div>
</div></a>
</div>
<div class="g-col-1" data-index="9" data-categories="QXJ0aWNsZSUyQ0hhc2tlbGw=" data-listing-date-sort="1514761200000" data-listing-file-modified-sort="1746774626159" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="17" data-listing-word-count-sort="3277">
<div class="g-col-1" data-index="8" data-categories="TGVjdHVyZSUyQ0hhc2tlbGw=" data-listing-date-sort="1514761200000" data-listing-file-modified-sort="1752960634934" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2" data-listing-word-count-sort="374">
<a href="./Coding/Haskell/FFPiH.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
<div class="card-body post-contents">
<h5 class="no-anchor card-title listing-title">
Fortgeschrittene funktionale Programmierung in Haskell
</h5>
<div class="listing-categories">
<div class="listing-category" onclick="window.quartoListingCategory('TGVjdHVyZQ=='); return false;">Lecture</div>
<div class="listing-category" onclick="window.quartoListingCategory('SGFza2VsbA=='); return false;">Haskell</div>
</div>
<div class="card-text listing-description delink">
FFPiH ist eine Vorlesung, die ich zusammen mit einem Kommilitonen im Sommer 2015 erstmals erstellt und gehalten haben.
</div>
<div class="card-attribution card-text-small justify">
<div class="listing-author">
</div>
<div class="listing-date">
January 1, 2018
</div>
</div>
</div>
</div></a>
</div>
<div class="g-col-1" data-index="9" data-categories="QXJ0aWNsZSUyQ0hhc2tlbGw=" data-listing-date-sort="1514761200000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="17" data-listing-word-count-sort="3277">
<a href="./Coding/Haskell/Lenses.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -989,36 +990,7 @@ January 1, 2018
</div>
</div></a>
</div>
<div class="g-col-1" data-index="10" data-categories="TGVjdHVyZSUyQ0hhc2tlbGw=" data-listing-date-sort="1514761200000" data-listing-file-modified-sort="1751196904263" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="2" data-listing-word-count-sort="374">
<a href="./Coding/Haskell/FFPiH.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
<div class="card-body post-contents">
<h5 class="no-anchor card-title listing-title">
Fortgeschrittene funktionale Programmierung in Haskell
</h5>
<div class="listing-categories">
<div class="listing-category" onclick="window.quartoListingCategory('TGVjdHVyZQ=='); return false;">Lecture</div>
<div class="listing-category" onclick="window.quartoListingCategory('SGFza2VsbA=='); return false;">Haskell</div>
</div>
<div class="card-text listing-description delink">
FFPiH ist eine Vorlesung, die ich zusammen mit einem Kommilitonen im Sommer 2015 erstmals erstellt und gehalten haben.
</div>
<div class="card-attribution card-text-small justify">
<div class="listing-author">
</div>
<div class="listing-date">
January 1, 2018
</div>
</div>
</div>
</div></a>
</div>
<div class="g-col-1" data-index="11" data-categories="SGFza2VsbCUyQ1R1dG9yaWFs" data-listing-date-sort="1451602800000" data-listing-file-modified-sort="1746775138729" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="5" data-listing-word-count-sort="862">
<div class="g-col-1" data-index="10" data-categories="SGFza2VsbCUyQ1R1dG9yaWFs" data-listing-date-sort="1451602800000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="5" data-listing-word-count-sort="862">
<a href="./Coding/Haskell/Code Snippets/Monoid.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -1047,7 +1019,7 @@ January 1, 2016
</div>
</div></a>
</div>
<div class="g-col-1" data-index="12" data-categories="SGFza2VsbCUyQ1R1dG9yaWFsJTJDQXJjaGl2ZWQ=" data-listing-date-sort="1451602800000" data-listing-file-modified-sort="1746813961303" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="8" data-listing-word-count-sort="1524">
<div class="g-col-1" data-index="11" data-categories="SGFza2VsbCUyQ1R1dG9yaWFsJTJDQXJjaGl2ZWQ=" data-listing-date-sort="1451602800000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="8" data-listing-word-count-sort="1524">
<a href="./Coding/Haskell/Code Snippets/Morphisms.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -1079,7 +1051,7 @@ January 1, 2016
</div>
</div></a>
</div>
<div class="g-col-1" data-index="13" data-categories="SGFza2VsbCUyQ0xpbmtz" data-listing-date-sort="1443650400000" data-listing-file-modified-sort="1746774666603" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="146">
<div class="g-col-1" data-index="12" data-categories="SGFza2VsbCUyQ0xpbmtz" data-listing-date-sort="1443650400000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="1" data-listing-word-count-sort="146">
<a href="./Coding/Haskell/Advantages.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -1108,7 +1080,7 @@ October 1, 2015
</div>
</div></a>
</div>
<div class="g-col-1" data-index="14" data-categories="QXJ0aWNsZSUyQ0V4cGVyaWVuY2UlMkNVbmk=" data-listing-date-sort="1420066800000" data-listing-file-modified-sort="1746815058456" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="9" data-listing-word-count-sort="1685">
<div class="g-col-1" data-index="13" data-categories="QXJ0aWNsZSUyQ0V4cGVyaWVuY2UlMkNVbmk=" data-listing-date-sort="1420066800000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="9" data-listing-word-count-sort="1685">
<a href="./Uni/Lernerfolg_an_der_Uni.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -1139,7 +1111,7 @@ January 1, 2015
</div>
</div></a>
</div>
<div class="g-col-1" data-index="15" data-categories="QXJ0aWNsZSUyQ0Z1biUyQ0FyY2hpdmVk" data-listing-date-sort="757378800000" data-listing-file-modified-sort="1746815508525" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="8" data-listing-word-count-sort="1535">
<div class="g-col-1" data-index="14" data-categories="QXJ0aWNsZSUyQ0Z1biUyQ0FyY2hpdmVk" data-listing-date-sort="757378800000" data-listing-file-modified-sort="1749112265687" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="8" data-listing-word-count-sort="1535">
<a href="./Stuff/Bielefeldverschwoerung.html" class="quarto-grid-link">
<div class="quarto-grid-item card h-100 card-left">
<p class="card-img-top"><img src="./thumbs/placeholder.png" style="height: 200;" class="thumbnail-image card-img"/></p>
@ -1187,7 +1159,7 @@ January 1, 1994
a.appendChild(i);
window.document.body.appendChild(a);
}
window.setColorSchemeToggle(window.hasAlternateSentinel())
setColorSchemeToggle(hasAlternateSentinel())
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {

1827
dist/index.xml vendored

File diff suppressed because it is too large Load Diff

5
dist/listings.json vendored
View File

@ -3,16 +3,15 @@
"listing": "/index.html",
"items": [
"/Writing/coding-age-ai.html",
"/Obsidian-Articles/Artikelbewertung durch LLM.html",
"/Writing/documentation.html",
"/Writing/ner4all-case-study.html",
"/Writing/Obsidian-RAG.html",
"/Coding/Haskell/Webapp-Example/Main.hs.html",
"/Coding/Haskell/Webapp-Example/MyService_Types.hs.html",
"/Coding/Haskell/Webapp-Example/index.html",
"/Coding/Haskell/Webapp-Example/MyService_Types.hs.html",
"/Health/Issues.html",
"/Coding/Haskell/Lenses.html",
"/Coding/Haskell/FFPiH.html",
"/Coding/Haskell/Lenses.html",
"/Coding/Haskell/Code Snippets/Monoid.html",
"/Coding/Haskell/Code Snippets/Morphisms.html",
"/Coding/Haskell/Advantages.html",

1655
dist/search.json vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*!
* Bootstrap Icons v1.11.1 (https://icons.getbootstrap.com/)
* Copyright 2019-2023 The Bootstrap Authors
* Bootstrap Icons v1.13.1 (https://icons.getbootstrap.com/)
* Copyright 2019-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/icons/blob/main/LICENSE)
*/
@ -8,7 +8,7 @@
font-display: block;
font-family: "bootstrap-icons";
src:
url("./bootstrap-icons.woff?2820a3852bdb9a5832199cc61cec4e65") format("woff");
url("./bootstrap-icons.woff?e34853135f9e39acf64315236852cd5a") format("woff");
}
.bi::before,
@ -2076,3 +2076,31 @@ url("./bootstrap-icons.woff?2820a3852bdb9a5832199cc61cec4e65") format("woff");
.bi-suitcase2-fill::before { content: "\f901"; }
.bi-suitcase2::before { content: "\f902"; }
.bi-vignette::before { content: "\f903"; }
.bi-bluesky::before { content: "\f7f9"; }
.bi-tux::before { content: "\f904"; }
.bi-beaker-fill::before { content: "\f905"; }
.bi-beaker::before { content: "\f906"; }
.bi-flask-fill::before { content: "\f907"; }
.bi-flask-florence-fill::before { content: "\f908"; }
.bi-flask-florence::before { content: "\f909"; }
.bi-flask::before { content: "\f90a"; }
.bi-leaf-fill::before { content: "\f90b"; }
.bi-leaf::before { content: "\f90c"; }
.bi-measuring-cup-fill::before { content: "\f90d"; }
.bi-measuring-cup::before { content: "\f90e"; }
.bi-unlock2-fill::before { content: "\f90f"; }
.bi-unlock2::before { content: "\f910"; }
.bi-battery-low::before { content: "\f911"; }
.bi-anthropic::before { content: "\f912"; }
.bi-apple-music::before { content: "\f913"; }
.bi-claude::before { content: "\f914"; }
.bi-openai::before { content: "\f915"; }
.bi-perplexity::before { content: "\f916"; }
.bi-css::before { content: "\f917"; }
.bi-javascript::before { content: "\f918"; }
.bi-typescript::before { content: "\f919"; }
.bi-fork-knife::before { content: "\f91a"; }
.bi-globe-americas-fill::before { content: "\f91b"; }
.bi-globe-asia-australia-fill::before { content: "\f91c"; }
.bi-globe-central-south-asia-fill::before { content: "\f91d"; }
.bi-globe-europe-africa-fill::before { content: "\f91e"; }

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,145 @@
class QuartoAxeReporter {
constructor(axeResult, options) {
this.axeResult = axeResult;
this.options = options;
}
report() {
throw new Error("report() is an abstract method");
}
}
class QuartoAxeJsonReporter extends QuartoAxeReporter {
constructor(axeResult, options) {
super(axeResult, options);
}
report() {
console.log(JSON.stringify(this.axeResult, null, 2));
}
}
class QuartoAxeConsoleReporter extends QuartoAxeReporter {
constructor(axeResult, options) {
super(axeResult, options);
}
report() {
for (const violation of this.axeResult.violations) {
console.log(violation.description);
for (const node of violation.nodes) {
for (const target of node.target) {
console.log(target);
console.log(document.querySelector(target));
}
}
}
}
}
class QuartoAxeDocumentReporter extends QuartoAxeReporter {
constructor(axeResult, options) {
super(axeResult, options);
}
createViolationElement(violation) {
const violationElement = document.createElement("div");
const descriptionElement = document.createElement("div");
descriptionElement.className = "quarto-axe-violation-description";
descriptionElement.innerText = `${violation.impact.replace(/^[a-z]/, match => match.toLocaleUpperCase())}: ${violation.description}`;
violationElement.appendChild(descriptionElement);
const helpElement = document.createElement("div");
helpElement.className = "quarto-axe-violation-help";
helpElement.innerText = violation.help;
violationElement.appendChild(helpElement);
const nodesElement = document.createElement("div");
nodesElement.className = "quarto-axe-violation-nodes";
violationElement.appendChild(nodesElement);
const nodeElement = document.createElement("div");
nodeElement.className = "quarto-axe-violation-selector";
for (const node of violation.nodes) {
for (const target of node.target) {
const targetElement = document.createElement("span");
targetElement.className = "quarto-axe-violation-target";
targetElement.innerText = target;
nodeElement.appendChild(targetElement);
nodeElement.addEventListener("mouseenter", () => {
const element = document.querySelector(target);
if (element) {
element.scrollIntoView({ behavior: "smooth", block: "center" });
element.classList.add("quarto-axe-hover-highlight");
setTimeout(() => {
element.style.border = "";
}, 2000);
}
});
nodeElement.addEventListener("mouseleave", () => {
const element = document.querySelector(target);
if (element) {
element.classList.remove("quarto-axe-hover-highlight");
}
});
nodeElement.addEventListener("click", () => {
console.log(document.querySelector(target));
});
nodeElement.appendChild(targetElement);
}
nodesElement.appendChild(nodeElement);
}
return violationElement;
}
report() {
const violations = this.axeResult.violations;
const reportElement = document.createElement("div");
reportElement.className = "quarto-axe-report";
if (violations.length === 0) {
const noViolationsElement = document.createElement("div");
noViolationsElement.className = "quarto-axe-no-violations";
noViolationsElement.innerText = "No axe-core violations found.";
reportElement.appendChild(noViolationsElement);
}
violations.forEach((violation) => {
reportElement.appendChild(this.createViolationElement(violation));
});
document.querySelector("main").appendChild(reportElement);
}
}
const reporters = {
json: QuartoAxeJsonReporter,
console: QuartoAxeConsoleReporter,
document: QuartoAxeDocumentReporter,
};
class QuartoAxeChecker {
constructor(opts) {
this.options = opts;
}
async init() {
const axe = (await import("https://cdn.skypack.dev/pin/axe-core@v4.10.3-aVOFXWsJaCpVrtv89pCa/mode=imports,min/optimized/axe-core.js")).default;
const result = await axe.run({
exclude: [
// https://github.com/microsoft/tabster/issues/288
// MS has claimed they won't fix this, so we need to add an exclusion to
// all tabster elements
"[data-tabster-dummy]"
],
preload: { assets: ['cssom'], timeout: 50000 }
});
const reporter = this.options === true ? new QuartoAxeConsoleReporter(result) : new reporters[this.options.output](result, this.options);
reporter.report();
}
}
export async function init() {
const opts = document.querySelector("#quarto-axe-checker-options");
if (opts) {
const jsonOptions = JSON.parse(atob(opts.textContent));
const checker = new QuartoAxeChecker(jsonOptions);
await checker.init();
}
}

View File

@ -218,4 +218,4 @@ code span.wa {
content: "</";
}
/*# sourceMappingURL=9be8b4365e7d8bb6f535c9d955e89405.css.map */
/*# sourceMappingURL=ee8e1d20cf943d820fb826620ca5527a.css.map */

View File

@ -202,4 +202,4 @@ code span.wa {
content: "</";
}
/*# sourceMappingURL=32086ec229fb0849d7fb131b930bf548.css.map */
/*# sourceMappingURL=5b59c7ae6244a5dcce189156d7e36afb.css.map */

View File

@ -1,4 +1,5 @@
import * as tabsets from "./tabsets/tabsets.js";
import * as axe from "./axe/axe-check.js";
const sectionChanged = new CustomEvent("quarto-sectionChanged", {
detail: {},
@ -826,6 +827,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
});
tabsets.init();
axe.init();
function throttle(func, wait) {
let waiting = false;

File diff suppressed because one or more lines are too long

116
dist/sitemap.xml vendored
View File

@ -1,95 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://drezil.de/index.html</loc>
<lastmod>2025-06-29T11:34:03.232Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Writing/Obsidian-RAG.html</loc>
<lastmod>2025-05-09T19:08:56.279Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Writing/coding-age-ai.html</loc>
<lastmod>2025-06-29T11:46:03.135Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Uni/Lernerfolg_an_der_Uni.html</loc>
<lastmod>2025-05-09T18:24:18.456Z</lastmod>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Opinions/Keyboard-Layout.html</loc>
<lastmod>2025-05-09T18:31:10.026Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/FFPiH.html</loc>
<lastmod>2025-06-29T11:35:04.263Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Lenses.html</loc>
<lastmod>2025-05-09T07:10:26.159Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Webapp-Example/MyService_Types.hs.html</loc>
<lastmod>2025-05-09T18:05:11.127Z</lastmod>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Code Snippets/Morphisms.html</loc>
<lastmod>2025-05-09T18:06:01.303Z</lastmod>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/index.html</loc>
<lastmod>2025-05-09T07:01:07.584Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/Work.html</loc>
<lastmod>2025-05-08T16:36:47.996Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/Experience.html</loc>
<lastmod>2025-05-08T16:36:47.996Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/Extracurricular.html</loc>
<lastmod>2025-05-08T16:36:48.003Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Code Snippets/Monoid.html</loc>
<lastmod>2025-05-09T07:18:58.729Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Webapp-Example/Main.hs.html</loc>
<lastmod>2025-05-09T18:04:40.395Z</lastmod>
<loc>https://drezil.de/Coding/Haskell/FFPiH.html</loc>
<lastmod>2025-07-19T21:30:34.934Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Webapp-Example/index.html</loc>
<lastmod>2025-06-29T11:30:44.156Z</lastmod>
<lastmod>2025-07-19T21:30:34.934Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Advantages.html</loc>
<lastmod>2025-05-09T07:11:06.603Z</lastmod>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Health/Issues.html</loc>
<lastmod>2025-05-09T19:29:56.847Z</lastmod>
<loc>https://drezil.de/About/Extracurricular.html</loc>
<lastmod>2025-06-05T08:31:05.677Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Opinions/Editors.html</loc>
<lastmod>2025-05-09T18:29:47.541Z</lastmod>
<loc>https://drezil.de/About/Work.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Stuff/Bielefeldverschwoerung.html</loc>
<lastmod>2025-05-09T18:31:48.525Z</lastmod>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Writing/Obsidian-RAG.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Writing/ner4all-case-study.html</loc>
<lastmod>2025-06-05T13:06:32.542Z</lastmod>
<lastmod>2025-07-19T21:30:34.934Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Writing/documentation.html</loc>
<lastmod>2025-06-05T17:18:21.768Z</lastmod>
<lastmod>2025-07-19T21:30:34.934Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Obsidian-Articles/Artikelbewertung durch LLM.html</loc>
<lastmod>2025-06-13T08:21:41.581Z</lastmod>
<loc>https://drezil.de/Writing/coding-age-ai.html</loc>
<lastmod>2025-07-31T10:50:54.486Z</lastmod>
</url>
<url>
<loc>https://drezil.de/index.html</loc>
<lastmod>2025-07-19T21:30:34.944Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/Experience.html</loc>
<lastmod>2025-06-05T08:31:05.677Z</lastmod>
</url>
<url>
<loc>https://drezil.de/About/index.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Webapp-Example/Main.hs.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Webapp-Example/MyService_Types.hs.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Code Snippets/Monoid.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Coding/Haskell/Lenses.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Opinions/Editors.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
<url>
<loc>https://drezil.de/Health/Issues.html</loc>
<lastmod>2025-06-05T08:31:05.687Z</lastmod>
</url>
</urlset>