Skip to content

Commit

Permalink
docs: update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Jan 8, 2024
1 parent 3b5fdb0 commit 4ddd2aa
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 22 deletions.
19 changes: 19 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created by https://www.toptal.com/developers/gitignore/api/hugo
# Edit at https://www.toptal.com/developers/gitignore?templates=hugo

### Hugo ###
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# Temporary lock file while building
/.hugo_build.lock

# End of https://www.toptal.com/developers/gitignore/api/hugo
17 changes: 0 additions & 17 deletions docs/_config.yml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
13 changes: 8 additions & 5 deletions docs/index.md → docs/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Goals
# Direct style for Functional Reactive Programming: an analysis in Scala & Kotlin

## Goals of the project

> Develop a few examples (not too complex) using asynchronous constructs and try to implement these examples in the two variants: using the current implementation of futures based on monadic constructs and the style that adopts gears (direct style).
Analyze aspects such as:
Analyze aspects such as:
>
> - ergonomicity of the two styles (which one results more thoughtful and/or verbose)
> - which of the two approaches has a real advantage in adoption, and when
> - Pros and cons of the two styles
> - how and when to use one approach rather than the other
> - any limitations and difficulties encountered in using them
# Content
## Roadmap

TBD
1. [Boundary and break](./docs/boundaries)

1. [Boundary and break](./content/boundaries.md)
TBD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- `boundary:` is short for `boundary.apply:` with the indented code below it passed as the body
- `block` is a context function that is called within boundary.apply to return the block of code shown in the example
- Users don’t define `Label` instances themselves. Instead, this is done inside the implementation of `boundary.apply` to provide the capability of doing a non-local return.

```scala
/** Run `body` with freshly generated label as implicit argument. Catch any
* breaks associated with that label and return their results instead of
Expand All @@ -18,6 +19,7 @@
if ex.label eq local then ex.value
else throw ex
```

- we don’t want users to call break without an enclosing boundary. That’s why break requires an in-scope given instance of Label, which the implementation of boundary.apply creates before it calls the code block you provide. If your code block calls break, a given Label will be in-scope.
- non-localbreaks are logically implemented as non-fatal exceptions and the implementation is optimized to suppress unnecessary stack trace generation. Stack traces are unnecessary because we are handling these exceptions, not barfing them on the user!
- optimizations: Better performance is provided when a break occurs to the enclosing scope inside the same method (i.e., the same stack frame), where it can be rewritten to a jump call.
Expand Down
5 changes: 5 additions & 0 deletions docs/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/tassiLuca/PPS-22-direct-style-experiments/docs

go 1.21.5

require github.com/alex-shpak/hugo-book v0.0.0-20231204233341-118997fa920e // indirect
2 changes: 2 additions & 0 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/alex-shpak/hugo-book v0.0.0-20231204233341-118997fa920e h1:vOzQO2BCcgZ+M5W5KkhRHWiryNX/4RuA0iJprMrMUH4=
github.com/alex-shpak/hugo-book v0.0.0-20231204233341-118997fa920e/go.mod h1:L4NMyzbn15fpLIpmmtDg9ZFFyTZzw87/lk7M2bMQ7ds=
18 changes: 18 additions & 0 deletions docs/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
baseURL = 'https://tassiluca.github.io/PPS-22-direct-style-experiments/'
languageCode = 'en-us'
title = 'PPS-22-direct-style-experiments'

enableGitInfo = true # to enable 'Last Modified by' date and git author information on 'doc' type pages.

[markup]
[markup.highlight]
style = 'catppuccin-latte'

[module]
[[module.imports]]
path = 'github.com/alex-shpak/hugo-book'

[params]
BookTheme = 'auto'
BookRepo = 'https://github.com/tassiLuca/PPS-22-direct-style-experiments' # used for 'Last Modified' and 'Edit this page' links
BookCommitPath = 'commit'

0 comments on commit 4ddd2aa

Please sign in to comment.