Vectornaut
  • Joined on 2019-09-28
392 contributions in the last 12 months
AprMayJunJulAugSepOctNovDecJanFebMarMonWedFri
Less
More
Vectornaut pushed to observables_on_main at Vectornaut/dyna3 2025-03-08 23:12:21 +00:00
08ec838334 Consolidate constructions from empty specification
b9db7a5699 Make use declarations more compact
Compare 2 commits »
Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-06 22:49:10 +00:00
Generalize constraints to observables

But I don't think you can pass a Flag() to something that wants a boolean, so this isn't too useful...

There are various ways to streamline the use of MyBranches values in conditionals.…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-06 21:57:18 +00:00
Generalize constraints to observables

For example, the expression if true { 3 } won't compile unless you add an else block to convince the compiler that it has the same type in all situations.

This is one advantage of using…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-06 21:39:32 +00:00
Generalize constraints to observables

Not necessarily, mostly just musing/wondering what Rust's behavior actually is when there is no else clause... if every expression/statement has a value, what is the value of an if let when…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-05 23:08:48 +00:00
Generalize constraints to observables

Either of the last two is fine by me

Done (6eeeb1c).

p.s. it would be sort of nice, and reasonably intuitive, if the default else-branch of an if let was just else {false}.

If this is…

Vectornaut pushed to observables_on_main at Vectornaut/dyna3 2025-03-05 23:05:14 +00:00
6eeeb1c6fd Bring back try_set as inline code
Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-05 22:25:09 +00:00
Generalize constraints to observables

So I guess I am specifically suggesting replacing this block with

if let Ok(spec) = SpecifiedValue::try_from(value.get_clone_untracked()) {
    valid.set(true)
   
Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-04 07:49:27 +00:00
Generalize constraints to observables

I've pushed changes that should resolve all the remaining conversations. If you agree, you can go ahead and review! Otherwise, let me know what other changes are needed.

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-04 07:36:34 +00:00
Generalize constraints to observables

I've switched to Proposal 1c (84bfdef), which we adopted during today's meeting. The SpecifiedValue structure is read-only, courtesy of the readonly

Vectornaut pushed to observables_on_main at Vectornaut/dyna3 2025-03-04 07:14:03 +00:00
84bfdefccb Rewrite SpecifiedValue as a read-only structure
Vectornaut pushed to observables_on_main at Vectornaut/dyna3 2025-03-04 04:45:54 +00:00
8b4a72c60c Simplify match to if let
Vectornaut commented on issue StudioInfinity/dyna3#18 2025-03-04 01:43:17 +00:00
Revive continuous integration system

I don't actually see anything that needs to be done, do you? It seems like the defaults are all fine...

After looking it over during today's meeting, I agree that it seems possible to set up…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-03 23:41:23 +00:00
Generalize constraints to observables

Your thoughts on just a method-only interface with an opaque underlying datatype that we can iterate on if we see fit without changing any client code?

At this point, I can't predict whether…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-03 21:19:19 +00:00
Generalize constraints to observables

Done (309b088).

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-03 21:18:21 +00:00
Generalize constraints to observables

I've removed if_present, replacing it with matches!(/* ... */, Present { .. }) where it was used (c58fed0)

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-03 21:16:30 +00:00
Generalize constraints to observables

Done (894931a).

Vectornaut pushed to observables_on_main at Vectornaut/dyna3 2025-03-03 21:14:03 +00:00
c58fed073d Drop the is_present utility method
309b0881df Move SpecifiedValue into its own module
894931a6e7 Replace try_set with set_if_ok
Compare 3 commits »
Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-01 09:26:34 +00:00
Generalize constraints to observables

The idea of using a parameterized trait is nice, but in this case I'd prefer to use methods named set and set_if_ok. The former always updates the set point, while the latter only updates the…

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-01 03:29:25 +00:00
Generalize constraints to observables

This is not the place to debate Husht […]

Agreed. I think you get the tradeoff at this point, so let me know whether you want to have is_present.

Vectornaut commented on pull request StudioInfinity/dyna3#48 2025-03-01 03:26:39 +00:00
Generalize constraints to observables

Now a point might be that try_from doesn't give you a SpecifiedValue, it gives you a Result<SpecifiedValue, SomeKindaError>.

Exactly.

But then wouldn't it be most natural just to…