Skip to content

Commit

Permalink
automatically update the experimental page
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jun 15, 2024
1 parent 3de044a commit 66f6291
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
4 changes: 1 addition & 3 deletions site/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ pub fn Docs() -> impl IntoView {
DocsPage::FormatConfig => {
title_markdown("Formatter Configuration", "/text/format_config.md", ()).into_view()
}
DocsPage::Experimental => {
title_markdown("Experimental Features", "/text/experimental.md", ()).into_view()
}
DocsPage::Experimental => Experimental().into_view(),
};

view! {
Expand Down
25 changes: 24 additions & 1 deletion site/src/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use leptos_meta::*;
use leptos_router::*;
use uiua::{Primitive, CONSTANTS};

use crate::{editor::Editor, markdown::markdown_view, Const, Hd, Prim, Prims};
use crate::{
editor::Editor,
markdown::{markdown_view, Markdown},
Const, Hd, Prim, Prims,
};

#[component]
pub fn Design() -> impl IntoView {
Expand Down Expand Up @@ -478,3 +482,22 @@ pub fn Combinators() -> impl IntoView {
<p>"I referenced "<a href="https://combinatorylogic.com/table.html">"these"</a>" "<a href="https://www.angelfire.com/tx4/cus/combinator/birds.html">"lists"</a>" of combinators when making this page."</p>
}
}

#[component]
pub fn Experimental() -> impl IntoView {
view! {
<Title text="Experimental Features - Uiua Docs"/>
<h1>"Experimental Features"</h1>
<p>"Uiua has a number of features that are considered experimental. They are available in the interpreter for testing, but may be removed or changed in the future."</p>
<p>"Using experimental features requires an "<code>"# Experimental!"</code>" comment to be placed at the top of a Uiua source file."</p>

<h2 id="functions-modifiers">"Experimental Functions and Modifiers"</h2>
<ul>{
Primitive::non_deprecated().filter(Primitive::is_experimental).map(|prim| {
view! { <li><Prim prim=prim/></li> }
}).collect::<Vec<_>>()
}</ul>

<Markdown src="/text/experimental.md"/>
}
}
19 changes: 0 additions & 19 deletions site/text/experimental.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
# Experimental Features

Uiua has a number of features that are considered experimental. They are available in the interpreter for testing, but may be removed or changed in the future.

Using experimental features requires an `# Experimental!` comment to be placed at the top of a Uiua source file.

## Experimental Functions/Modifiers

- [`coordinate`]()
- [`stringify`]()
- [`astar`]()
- [`fft`]()
- [`case`]()
- [`triangle`]()
- [`&ffi`]()
- [`&memcpy`]()
- [`&memfree`]()
- [`&tlsl`]()

## Stack Swizzles

Stack swizzles allow you to reorder the stack in a concise way.
Expand Down

0 comments on commit 66f6291

Please sign in to comment.