Pet project to get acquainted with Rust, and mess around with symbolic expressions.

Related tags

Command-line symba
Overview

Symba

Pet project to get acquainted with Rust, and to mess around with symbolic expressions, hence the name 'Symba'.

Example:

    use asg::{deftree, reduce::reduce};

    fn main() {
        let tree = deftree!(/ (+ (* k x) (* k y)) (+ x y));
        let max_iter = 10;
        println!("${}$\n", tree.to_latex());
        let steps = reduce(tree, max_iter).unwrap();
        for step in steps {
            println!("$= {}$\n", step.to_latex());
        }
    }

The above program will produce the following latex output (hopefully rendered by GitHub):

$\dfrac{{{k}.{x}} + {{k}.{y}}}{{x} + {y}}$

$= \dfrac{{k}.{\left({x} + {y}\right)}}{{x} + {y}}$

$= {k}.{\dfrac{{x} + {y}}{{x} + {y}}}$

$= k$

You might also like...
A quick-and-dirty attempt to get scoped tasks in Rust.

scoped_tasks_prototype A quick-and-dirty attempt to get scoped tasks in Rust. This library tries to provide an interface similar to scoped threads, ac

A CLI utility installed as
A CLI utility installed as "ansi" to quickly get ANSI escape sequences. Supports the most basic ones, like colors and styles as bold or italic.

'ansi' - a CLI utility to quickly get ANSI escape codes This Rust project called ansi-escape-sequences-cli provides an executable called ansi which ca

Execute Javascript code in the Dioxus, and get the return value ( for Dioxus )

Golde Dioxus Execute Javascript code in the Dioxus, and get the return value. This demo can help use Javascript to calc the + operator formula. use di

Shared memory - A Rust wrapper around native shared memory for Linux and Windows

shared_memory A crate that allows you to share memory between processes. This crate provides lightweight wrappers around shared memory APIs in an OS a

⚡️Blazing Fast⚡️ CLI tool to get Bible verses with Rust 🦀

bible.rs This is a simple command line tool that accesses bible-api.com to print Bible verses in the terminal Installation brew install wzid/tap/bible

A small script in rust to get the cpu usage in %'s with a gradient color for the text
A small script in rust to get the cpu usage in %'s with a gradient color for the text

cpu_usage-polybar A small script in rust to get the cpu usage in %'s with a gradient color for the text To get it to work on your PC you will have to

Get relevant files/authors for your code - binary written in rust

ContextPilot: All the context, right at your door code step. What is ContextPilot? Use this binary to find top N (all for now) relevant files and auth

ruborute is an interactive command-line tool to get asphyxia@sdvx gaming data.

ruborute Are you 暴龍天 ?. The ruborute is an interactive command-line tool to get asphyxia@sdvx gaming data. asphyxia-core/plugins: https://github.com/a

A tree-sitter based AST difftool to get meaningful semantic diffs
A tree-sitter based AST difftool to get meaningful semantic diffs

diffsitter Disclaimer diffsitter is very much a work in progress and nowhere close to production ready (yet). Contributions are always welcome! Summar

Comments
  • Consider making  this a commandline tool

    Consider making this a commandline tool

    Many users are not going to recompile symba each time they want to work with a math expression.

    Consider publising a commandline tool that:

    1. Takes the commandline argument and processes it
    2. If no commandline argument, prompt the user, read stdin, process the expression, output the result and return to the prompt
    3. Read from stdin, process and emit results to stdout.
    4. Develop a GUI around symba, making it more accessable and more likely to appeal to Windows and macOS users as well as Linux folk.
    opened by johnblommers 1
Owner
Ranjeeth Mahankali
Software Developer - Design Automation - Computational Geometry.
Ranjeeth Mahankali
Conference Monitoring Project based on Image Recognition that uses Rust Language and AWS Rekognition service to get the level of image similarity.

Conference Monitoring System based on Image Recognition in Rust This is a Conference Monitoring Project based on Image Recognition that uses Rust Lang

Pankaj Chaudhary 6 Dec 18, 2022
RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions

RnR is a command-line tool to securely rename multiple files and directories that supports regular expressions. Features Batch rename files and direct

Ismael González Valverde 219 Dec 31, 2022
😎 Pretty way of writing regular expressions in Rust

?? Write readable regular expressions The crate provides a clean and readable way of writing your regex in the Rust programming language: Without pret

Adi Salimgereyev 7 Aug 12, 2023
Generate progress bars from cron expressions.

jalm Generate Progress Bars from Cron Expressions Installation and Usage Grab the latest binary from the Github Actions tab. Alternatively, to build f

iamkneel 22 Oct 30, 2022
Asserts const generic expressions at build-time.

build_assert build_assert allows you to make assertions at build-time. Unlike assert and some implementations of compile-time assertions, such as stat

MaxXing 4 Nov 23, 2023
SKYULL is a command-line interface (CLI) in development that creates REST API project structure templates with the aim of making it easy and fast to start a new project.

SKYULL is a command-line interface (CLI) in development that creates REST API project structure templates with the aim of making it easy and fast to start a new project. With just a few primary configurations, such as project name, you can get started quickly.

Gabriel Michaliszen 4 May 9, 2023
A small Rust library that let's you get position and size of the active window on Windows and MacOS

active-win-pos-rs A small Rust library that let's you get position and size of the active window on Windows and MacOS Build % git clone https://github

Dmitry Malkov 21 Jan 6, 2023
🍅 A command-line tool to get and set values in toml files while preserving comments and formatting

tomato Get, set, and delete values in TOML files while preserving comments and formatting. That's it. That's the feature set. I wrote tomato to satisf

C J Silverio 15 Dec 23, 2022
Get your loadshedding schedule in your calendar and never be left in the dark! Open-source, up-to-date, and developer friendly.

Loadshedding schedules in your digital calendar. No apps, no ads, up-to-date, and developer friendly. Get it • Key Features • Using the data • Project

Boyd Kane 117 Apr 26, 2023
Navigating around TUM with excellence – An API and website to search for rooms, buildings and other places

NavigaTUM NavigaTUM is a non-official tool developed by students for students, that aims to help you get around at TUM. Feel free to contribute. Featu

TUM Developers 21 Dec 22, 2022