mirror of
https://github.com/rm-dr/daisy
synced 2025-06-30 22:23:40 -07:00
Compare commits
15 Commits
v1.1.4
...
3c8ed9f4f3
Author | SHA1 | Date | |
---|---|---|---|
3c8ed9f4f3 | |||
b7a6378589 | |||
5e34017225 | |||
d9730fd699
|
|||
5788ffa085
|
|||
2f2c005c86
|
|||
ffebcf2e15
|
|||
4e1df2399b | |||
5a921cfc7b | |||
2531524ffd
|
|||
e5525adcca
|
|||
a61cbf29e5
|
|||
39ab47530e | |||
be28669416
|
|||
63d4a01095 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/target
|
||||
/src/target
|
||||
/pkg
|
||||
/pkg
|
||||
/result
|
31
CONTRIBUTING.MD
Normal file
31
CONTRIBUTING.MD
Normal file
@ -0,0 +1,31 @@
|
||||
# Contribution guidelines for Daisy
|
||||
|
||||
|
||||
## Pull requests
|
||||
All PRs should merge to `dev`. See "branching" below.
|
||||
|
||||
|
||||
## Versioning
|
||||
Daisy uses [semantic versioning](https://semver.org/), which looks like `maj.min.patch`. In short:
|
||||
- `maj`: Incremented on large, incompatible changes
|
||||
- `min`: Incremented on new features
|
||||
- `patch`: Incremented on bugfixes
|
||||
|
||||
Whenever one of the above fields is incremented, all sub-fields are reset to zero. When `min` is incremented, `patch` is set to zero.
|
||||
|
||||
|
||||
## Branching
|
||||
Daisy uses a branch model much like the one described [here](https://nvie.com/posts/a-successful-git-branching-model).
|
||||
- `master`: 1 commit = 1 release. This is always a merge comit from `dev`, and is always tagged with a version.
|
||||
- `dev`: main development branch. Never deleted. Most work happens here.
|
||||
- `features`: temporary branches pulled from `dev` and merged to `dev` for larger features.
|
||||
- Always merge with git's `--no-ff` option for a more detailed history.
|
||||
|
||||
|
||||
## Releases
|
||||
What to do
|
||||
- Merge into `master` (`git merge --no-ff dev`)
|
||||
- Tag merge commit on `master` (`git tag -a v1.0.0 -m "Version 1.0.0"`)
|
||||
- `cargo publish`
|
||||
- Update web demo & pull server (`make docker`)
|
||||
- Update aur package
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -28,7 +28,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "daisycalc"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"num",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "daisycalc"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
edition = "2021"
|
||||
build = "buildscript/main.rs"
|
||||
license = "GPL-3.0-only"
|
||||
|
5
Makefile
5
Makefile
@ -14,5 +14,6 @@ publish:
|
||||
cargo test
|
||||
cargo publish
|
||||
|
||||
docker:
|
||||
docker build ./server -t git.betalupi.com/mark/daisy
|
||||
docker: wasm
|
||||
docker build ./server -t git.betalupi.com/mark/daisy --no-cache
|
||||
docker push git.betalupi.com/mark/daisy
|
||||
|
20
README.md
20
README.md
@ -7,13 +7,25 @@ Many features are missing, this is still under development.
|
||||
**Web demo: [here](https://daisy.betalupi.com) (won't work on mobile)**
|
||||
|
||||
# 📦 Installation
|
||||
- **From source:** `cargo build --release`, binary will be at `./target/release/daisy`
|
||||
- **Cargo:** `cargo install daisycalc`
|
||||
- **Arch:** `yay -S daisy`
|
||||
- **Debian:** coming soon
|
||||
- **Nix:** Use `default.nix`. Daisy isn't in nixpkgs yet, you'll need to add something like the following to `configuration.nix`:
|
||||
|
||||
From source: `cargo build --release` \
|
||||
Binary will be in `target/release/daisy`
|
||||
|
||||
```nix
|
||||
let
|
||||
daisy = builtins.fetchGit {
|
||||
url = "https://github.com/rm-dr/daisy.git";
|
||||
ref = "master";
|
||||
} + /default.nix;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
(callPackage daisy { })
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
# 📹 Screenshot
|
||||
|
||||
@ -22,7 +34,7 @@ Binary will be in `target/release/daisy`
|
||||
# 🛠️ Features
|
||||
- Open-source
|
||||
- Extremely high precision
|
||||
- Uses a rational datatype when possible, and a high-precision float when not.
|
||||
- Uses a rational datatype when possible, and a high-precision float when not.
|
||||
- Pretty printing in prompt (with special substitutions)
|
||||
- Supports many physical units, with metric and binary prefixes
|
||||
- Supports exponential notation
|
||||
|
20
TODO.md
20
TODO.md
@ -1,19 +1,3 @@
|
||||
## Version Bump checklist
|
||||
- update Cargo.toml
|
||||
- run cargo test
|
||||
- commit
|
||||
- push
|
||||
- merge
|
||||
- git tag -a v1.0.0 -m "Version 1.0.0" on merge commit
|
||||
- cargo publish
|
||||
- Build wasm & push changes
|
||||
- Update AUR package
|
||||
|
||||
## Pre-release
|
||||
- Tuple operations
|
||||
- we don't need vectors as arguments to operators
|
||||
- Fix linelocation when evaluating functions
|
||||
|
||||
## Parser
|
||||
- Should functions be operators?
|
||||
- Binary, hex, octal numbers
|
||||
@ -26,6 +10,7 @@
|
||||
- Non-recursive treeify
|
||||
- Faster factorial function. Maybe use gamma instead?
|
||||
- Arbitrary precision floats
|
||||
- we don't need vectors as arguments to operators
|
||||
|
||||
## Math Features
|
||||
- Mean, Median, Min
|
||||
@ -34,6 +19,7 @@
|
||||
- acot/acoth functions
|
||||
- Sums and products with functional arguments
|
||||
- Add functions: gcd, inverse mod, dice
|
||||
- Tuple operations
|
||||
|
||||
## Prompt
|
||||
- Fix terminal color detection
|
||||
@ -47,5 +33,5 @@
|
||||
- long prefixes (megatonne, etc)
|
||||
- HMS for degrees
|
||||
- Exact radians, using pi constant?
|
||||
- Weird units: flops, lumen, lux, bel
|
||||
- Odd units: flops, lumen, lux, bel
|
||||
- Command to list units
|
@ -49,7 +49,7 @@ value = "1.602176634e-19 C"
|
||||
enum_name = "ElectronMass"
|
||||
pretty_name = "Electron mass"
|
||||
strings = ["electronmass"]
|
||||
value = "9.1093837015-31 kg"
|
||||
value = "9.1093837015e-31 kg"
|
||||
|
||||
[[constant]]
|
||||
enum_name = "ProtonMass"
|
||||
@ -205,4 +205,4 @@ value = "TW * hour"
|
||||
[[constant]]
|
||||
enum_name = "PWH"
|
||||
strings = "PWh"
|
||||
value = "PW * hour"
|
||||
value = "PW * hour"
|
||||
|
19
default.nix
Normal file
19
default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ lib, fetchgit, rustPlatform }:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "daisy";
|
||||
version = "1.1.4";
|
||||
cargoLock.lockFile = src + /Cargo.lock;
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/rm-dr/daisy.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-aENuKtE1+tBRN0HZzRr8Gk+dVEYTiP6FNRz817Sk88o=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A pretty command-line scientific calculator";
|
||||
homepage = "https://github.com/rm-dr/daisy";
|
||||
#license = licenses.GPL;
|
||||
maintainers = [ maintainers.tailhook ];
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user