README.md update
This commit is contained in:
parent
24a852f125
commit
60b8e50b70
2 changed files with 29 additions and 14 deletions
40
README.md
40
README.md
|
|
@ -75,19 +75,41 @@ And I cherry picked things I like, mostly from rust and python.
|
||||||
* strings
|
* strings
|
||||||
* bools
|
* bools
|
||||||
* chars
|
* chars
|
||||||
* lists (as literals)
|
* lists and maps (as literals)
|
||||||
* type checking and type inference (although it needs more testing)
|
* type checking and type inference (although it needs more testing)
|
||||||
* arithmetic expressions
|
* arithmetic expressions
|
||||||
* function declaration and calling
|
* function declaration and calling
|
||||||
* indenting like python (for now just 1 level, but both tabs or double spaces)
|
* indenting like python (for now just 1 level, but both tabs or double spaces)
|
||||||
* strict typing like in rust (no implicit numeric conversions)
|
* strict typing like in rust (no implicit numeric conversions)
|
||||||
* basic set of operators, including logical and/or and bitwise operations
|
* basic set of operators, including logical and/or and bitwise operations
|
||||||
|
* includes a rudimentary REPL
|
||||||
|
* ```cargo run -- --repl```)
|
||||||
|
* list functions and functions that serve endpoints
|
||||||
|
* planned:
|
||||||
|
* edit source files
|
||||||
|
* test endpoints
|
||||||
|
* basic http support (GET, POST, PUT, DELETE)
|
||||||
|
* watch daemon that recompiles on file changes
|
||||||
|
* ```cargo run -- --watch```
|
||||||
|
|
||||||
## What's next?
|
## What's next?
|
||||||
- collection types: --list-- and map
|
* guards: this will be the way to correctly deal with parameters
|
||||||
- object/struct types
|
```
|
||||||
- control flow
|
fn get():
|
||||||
- tests
|
| path == "/" -> list:
|
||||||
|
service.get_all()
|
||||||
|
| path == "/{uuid}" -> Customer?:
|
||||||
|
service.get(uuid)?
|
||||||
|
| path == "/" && query.firstname -> Customer?:
|
||||||
|
service.get_by_firstname(fname)?
|
||||||
|
| path == "/" && query.last_name -> Customer?
|
||||||
|
service.get_by_lastname(lname)?
|
||||||
|
| 404
|
||||||
|
```
|
||||||
|
* this may also require ADT's...
|
||||||
|
* object/struct types: Work in Progress
|
||||||
|
* control flow
|
||||||
|
* test support
|
||||||
|
|
||||||
## What about performance?
|
## What about performance?
|
||||||
* Clueless really! We'll see.
|
* Clueless really! We'll see.
|
||||||
|
|
@ -158,11 +180,3 @@ fn add(a: string, b: string) -> string:
|
||||||
a + " " + b
|
a + " " + b
|
||||||
```
|
```
|
||||||
* get() is the entry point for http GET method calls, likewise for POST, PUT, DELETE, etc.
|
* get() is the entry point for http GET method calls, likewise for POST, PUT, DELETE, etc.
|
||||||
|
|
||||||
teveel ideeen
|
|
||||||
* een repl die ook een test client is
|
|
||||||
* :le list endpoints -> tree
|
|
||||||
* :lf list functions -> tree
|
|
||||||
* met ... debugger FLW!
|
|
||||||
* ingebouwde editor (vi) reload on save
|
|
||||||
* genereren van openapi spec
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ use std::sync::mpsc::channel;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
use arc_swap::ArcSwap;
|
use arc_swap::ArcSwap;
|
||||||
|
use log::info;
|
||||||
|
|
||||||
const ONE_SEC: Duration = Duration::from_secs(1);
|
const ONE_SEC: Duration = Duration::from_secs(1);
|
||||||
|
|
||||||
|
|
@ -44,7 +45,7 @@ pub fn start_watch_daemon(source: &str, registry: Arc<ArcSwap<HashMap<String, Ch
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println!("refresh"); // TODO implement refresh source
|
info!("Change detected"); // TODO implement refresh source
|
||||||
let new_registry = Arc::new(compile_sourcedir(&s).unwrap());
|
let new_registry = Arc::new(compile_sourcedir(&s).unwrap());
|
||||||
|
|
||||||
registry.store(new_registry.clone());
|
registry.store(new_registry.clone());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue