Sonny Scroggin

Results 65 comments of Sonny Scroggin

Is this regarding the `with_field_name` finders? https://github.com/chrismccord/atlas/blob/master/lib/atlas/finders.ex#L30 What if we removed those in favor of a `find_by/1` which takes a keyword list like ActiveRecord 4? ``` elixir User.find_by(username: "bob", password:...

FWIW, I've had pretty good luck using `env_logger`: https://github.com/scrogson/franz/blob/master/native/franz/src/lib.rs#L12

From and API ergonomics perspective I'd like to see this: ```rust use rustler::term::Map; let mut map = Map::new(env); map.put(key, "string".to_string()); assert_eq!(map.get(key), Some("string")); ```

Hey @sunny-g! Thanks for updating this. I've got some ideas here that I want to share but I don't have the time to articulate it thoroughly right now. I'll take...

@sunny-g here's what I'm thinking... Simplify the `Schedule` enum to this... ```rust pub enum Schedule { Return(T), Continue(Nif, Vec), } impl NifReturnable for Schedule where T: NifReturnable { ... }...

> As you might remember, I had that in the original PR. I went back and looked at the original commits as I didn't remember what it looked like before,...

Another thought here is maybe we only need a macro or some function to convert the args? And use: ```rust let args: Vec = args!(env, a, b, c, ...); Schedule::Continue(my_nif,...

```rust #[rustler::nif] fn scheduled_fac(env: Env, input: u32, result: Option) -> Schedule { let result = result.unwrap_or(1); if input == 0 { Schedule::Return(result) } else { Schedule::Continue(scheduled_fac, args!(env, input - 1,...

> 1. are the flags required, or are you specifying it to just highlight that they might differ from the NIF macro definition? The schedule flag should be allowed to...