Skip to content

Commit

Permalink
change tutorial layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jzstark committed Mar 10, 2024
1 parent ffbb7e5 commit f491ef7
Show file tree
Hide file tree
Showing 789 changed files with 623 additions and 45,418 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Owl Book CI Workflow
on:
push:
branches:
- master
- master123
pull_request:
branches:
- master
- master123

jobs:
build:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ book/*.toc
book/*.ilg

.vscode/

_site
Gemfile.lock
.jekyll-cache/
25 changes: 25 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
30 changes: 0 additions & 30 deletions Dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions Dockerfile.base

This file was deleted.

36 changes: 36 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "jekyll-remote-theme"
47 changes: 0 additions & 47 deletions HISTORY.log

This file was deleted.

33 changes: 0 additions & 33 deletions Makefile

This file was deleted.

41 changes: 1 addition & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
# Owl Online Tutorial

The main purpose of the online tutorial is for teaching how to use Owl software. The tutorial also convers many useful numerical and system techniques in numerical computing. Furthermore, the tutorial includes in-depth discussion on the lessons learnt by building a large and complex software system to enable scientific computing in OCaml.

The tooling and template reuse those in [Real World OCaml](https://realworldocaml.org/) under original authors' permission, with minor modidications.


Test code:

```ocaml
let test_sum_reduce ?(seq = false) ?(a = true) expected shape axis =
let input = if seq = false then N.ones shape else N.sequential shape in
let output = if a = true then N.sum_reduce ~axis input else N.sum_reduce input in
let out_shp = N.shape output in
let expected = N.of_array expected out_shp in
close output expected
```

## Compile

- `make` uses docker container to build the book.
- `make test` synchronises with Owl API by evaluating the code snippet in the tutorial book.
- `make compile` generates html files.
- Edit `book/toc.scm` to add more chapters. Do not edit `book/tune` and `static/dune` directly.
- Refer to [RWO](https://github.com/realworldocaml/book/blob/master/README.md) for details.

Note that tooling is not finished at the moment. Structure and tools are copied mostly from RWO book.


## Contribute

Currently contribution to the book is mainly in the form of Pull Request.
Normally you only need to change one of the `README.md` files in `book/` directory, though adding inline scripts requires some special care.
Please make sure that your local changes compile without any error, and include both the change of markdown file in `docs/` directory in a PR.


## Tooling

The following tools are used in the project, please refer to their documentation.

- [Pandoc](https://pandoc.org/MANUAL.html)
- [Pandoc-crossref](http://lierdakil.github.io/pandoc-crossref/)
The main purpose of the online tutorial is for teaching how to use Owl software. The tutorial also convers many useful numerical and system techniques in numerical computing. Furthermore, the tutorial includes in-depth discussion on the lessons learnt by building a large and complex software system to enable scientific computing in OCaml.
58 changes: 58 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
#
# If you need help with YAML syntax, here are some quick references for you:
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
# https://learnxinyminutes.com/docs/yaml/
#
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.

title: Owl Tutorial
email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://ocaml.xyz/tutorial/" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jzstark

# Build settings
remote_theme: pages-themes/[email protected]
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one

show_downloads: false

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
#
# exclude:
# - .sass-cache/
# - .jekyll-cache/
# - gemfiles/
# - Gemfile
# - Gemfile.lock
# - node_modules/
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
Loading

0 comments on commit f491ef7

Please sign in to comment.