-
Notifications
You must be signed in to change notification settings - Fork 0
/
DONE.todo
109 lines (100 loc) · 5.55 KB
/
DONE.todo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
save/restore state to/from json file:
save cmd:
✔ serialize `State` to json string @done(22-04-20 11:45)
- https://docs.serde.rs/serde_json/#creating-json-by-serializing-data-structures
✔ save string to file @done(22-04-20 11:45)
- https://docs.rs/tokio/latest/tokio/fs/struct.File.html
load cmd:
✔ read string from file @done(22-04-20 14:10)
- https://docs.rs/tokio/latest/tokio/fs/struct.File.html
✔ deserialize json string to `State` @done(22-04-20 14:10)
- https://docs.serde.rs/serde_json/#parsing-json-as-strongly-typed-data-structures
on exit:
✔ call save cmd @done(22-04-20 14:59)
on start:
✔ call load cmd @done(22-04-20 14:59)
rewrite redux lib: use async trait objs & not wrapped fns:
✔ rewrite existing code to use this @done(22-04-17 18:21)
async lambda & async traits:
✔ async lambda experiment (put them in a vec) @done(22-04-15 14:53)
✔ async traits experiment (express mw as struct that impl trait, add that to vec) @done(22-04-15 14:53)
✔ make a mw trait containing an async method (takes args & returns option) @done(22-04-15 14:53)
✔ make a mw struct that impls the mw trait & provide a constructor method @done(22-04-15 14:53)
✔ make a vec that holds the mw structs & exec them asynchronously w/ tokio @done(22-04-15 14:53)
fix async middleware:
✔ fix r3bl_rs_utils @done(22-04-13 17:50)
✔ fix add-async cmd @done(22-04-13 17:50)
✔ re-organize Action into Sync and Async sub-variants @done(22-04-14 12:23)
✔ make macro to `fire_and_forget` (tokio spawn async block) @done(22-04-14 12:51)
✔ try to use iterator for safe list (instead of decl macro that was deleted) @done(22-04-14 15:43)
generate dummy names for address book data:
✔ use api to generate name dummy data (for address book add cmd) @done(22-04-12 15:50)
- https://en.namefake.com/api
- https://api.namefake.com/english-united-states/female/
google sheets:
✔ research sync this address book data w/ google sheet @done(22-04-12 11:18)
- [code](https://git.sr.ht/~gruberb/onetutorial/commit/step_10#src/main.rs)
- [crate](https://crates.io/crates/google-sheets4)
- [starter-template](https://dev.to/rohanrajpal/rust-google-sheets-api-quickstart-7f1)
- [gsheets api](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values)
- [api key](https://developers.google.com/workspace/guides/create-project)
serde:
✔ advanced serde @done(22-04-10 15:46)
- `serde_as`
- https://docs.rs/serde_with/latest/serde_with/guide/serde_as/index.html
- https://docs.rs/serde_with/latest/serde_with/guide/feature_flags/index.html#macros
- https://docs.rs/serde_with/latest/serde_with/guide/serde_as_transformations/index.html
- `serde` field attributes
- https://serde.rs/field-attrs.html
- https://serde.rs/field-attrs.html#deserialize_with
- `serde` & `chrono`
- https://docs.rs/chrono/latest/chrono/index.html#reexports
- https://datatracker.ietf.org/doc/html/rfc3339#section-5.8
- `serde` & custom deserializer
- https://play.integer32.com/?version=stable&mode=debug&edition=2018&gist=83c99d83e5bf34c0238c0aaf900135a8
- https://www.tousu.in/qa/?qa=463981/
✔ get data from awair local api via `air` command & use `quicktype.io` to get struct @done(22-04-11 18:08)
- sample data: <https://github.com/nazmulidris/rust_scratch/blob/main/address-book-with-redux/sample_data/await-local-api.data.json>
- name: AWAIR-ELEM-1429F4
- ip-addr: <http://192.168.1.8>
- mac-addr: 70:88:6B:14:29:F4
serde and vscode tools (quicktype):
✔ install `serde` and play w/ it @done(22-04-09 16:32)
- https://docs.serde.rs/serde_json/
✔ play w/ json to rust struct transform (for serde) using: @done(22-04-09 17:04)
- https://marketplace.visualstudio.com/items?itemName=typeguard.quicktype-vs
- https://app.quicktype.io/
get started w/ async web api https://git.sr.ht/~gruberb/onetutorial:
✔ follow tut to get fetch data from api @done(22-04-08 15:14)
- git commit: https://git.sr.ht/~gruberb/onetutorial/commit/step_1#Cargo.toml
- endpoint: http://httpbin.org/ip
- reqwest: https://crates.io/crates/reqwest
- rust cookbook: https://rust-lang-nursery.github.io/rust-cookbook/web/clients.html
✔ install `reqwest` @done(22-04-08 15:14)
✔ play w/ what is my ip @done(22-04-08 15:14)
- sample data: <https://github.com/nazmulidris/rust_scratch/blob/main/address-book-with-redux/sample_data/httpbin-org.data.json>
upgrade latest r3bl_rs_utils w/ proc macros & 3 crates:
✔ update to latest r3bl_rs_utils 0.7.6 @done(22-04-06 14:18)
✔ update to latest r3bl_rs_utils 0.7.7 @done(22-04-07 16:08)
Basic:
✔ Create simple CLI event loop that allows the user to interact with the address book
✔ Use `readline` to get user input (from `r3bl_rs_utils`)
✔ Create action enum
✔ Create state & address book data model
✔ Add search term support
✔ Create reducer function
✔ Create Redux store
✔ Move to `lib.rs`
✔ Add support for middleware
✔ Create a simple TUI that takes input to mutate this store and display the state to stdout
✔ Refactor the `store.rs` into multiple files (prepare for publishing it in the future).
Intermediate:
✔ Add Redux history support
Concurrency:
✔ Make middleware async / parallel
✔ Wrap the store itself in an `Arc<Mutex>` / `Arc<RwLock>`
✔ Use `tokio`
Publish:
✔ Publish Redux store to `r3bl_rs_utils`
✔ Write developerlife.com article on `tokio`
✔ Write developerlife.com article on Redux & Rust