Thanks! I haven’t got a test yet but I’ve got a pretty good idea to produce one. I’ll at least push that somewhere asap
Do you have any advice on where to put that code? Just as a snippet on an issue? Or a branch?
Ross A. Baker
@rossabaker
I'd open an issue with it.
Christopher Davenport
@ChristopherDavenport
@TimWSpence Updating now. I was thinking about adding the Reindeer problem as another doc? Hoping that helps me through understanding the system fully as well.
Tim Spence
@TimWSpence
Cheers Chris! Yeah, the reindeer problem would be awesome! If it runs, would be a great test of what we’ve got so far as well
Christopher Davenport
@ChristopherDavenport
Totally was wondering if it would interact with the retry conditions you were fixing.
Very nice fixes. They look clean.
Tim Spence
@TimWSpence
Thanks! :) There’s actually one more fix to come: TimWSpence/cats-stm#15 Currently, we miss some opportunities to retry a txn if it involves an orElse. The build for that currently fails because of mima but your comment on your PR seemed to suggest mima wasn’t currently configured to fail builds?
Christopher Davenport
@ChristopherDavenport
Did you release a new version?
Tim Spence
@TimWSpence
Yeah, a couple of days ago
Christopher Davenport
@ChristopherDavenport
Yeah, version will likely need to be bumped again.
So for both your PR and mine, we would have to bump the major version to make mima happy?
Christopher Davenport
@ChristopherDavenport
No, since we are in 0.x, we can bump minor.
Going 1.x is only once we are very happy with the design.
Tim Spence
@TimWSpence
yeah sorry, just saw if (major >= 1) Range(0, minor).inclusive.toList else List(minor)
:+1:
Christopher Davenport
@ChristopherDavenport
Http4s/Doobie still haven’t gone 1.0 yet. We want to get to a point of stability in minor versions before we consider that.
Tim Spence
@TimWSpence
Yeah definitely
Thanks very much for your change :) If you bump the version on it, I guess the build should pass. I’ll probably not get to look at this again till tonight or tomorrow morning but I’ll merge it asap then
_
Christopher Davenport
@ChristopherDavenport
Personally I want to get this library rock-solid such that I can use it as another foundation dependency right with cats-effect. As I have several libraries that could majorly benefit from STM, but we need to get everything stable and reliable first.
Tim Spence
@TimWSpence
:) I’m keen!
I think the basics are getting there but there’s plenty of work to do. It would be very nice to move as much of the execution as possible out of the critical section
although that’s not API breaking so in some ways not do pressing
Christopher Davenport
@ChristopherDavenport
Where would you like the Reindeer problems in the docs. As the “docs” folder seems to be more geared to introducing the primitives.
Tim Spence
@TimWSpence
That’s a good question. I guess we could follow cats effect’s example and introduce a hierarchy like in https://typelevel.org/cats-effect/datatypes/ Then we could have eg Theory, Data Types and Examples as top level?
very open to other suggestions as well!
Christopher Davenport
@ChristopherDavenport
I like it, I’ll see what I can do.
Tim Spence
@TimWSpence
Thanks so much!! :)
Christopher Davenport
@ChristopherDavenport
@TimWSpence Why did you choose set/get rather than write/read like the paper?
Christopher Davenport
@ChristopherDavenport
We either have a bug somewhere or my example is wrong, I’ll post shortly.
Tim Spence
@TimWSpence
@ChristopherDavenport I think I took the naming from cats effect Ref but honestly can’t remember :joy: Open to being persuaded we should rename
This is one reason I was keen to have a bigger example working. What’s the behaviour? If it hangs, it could be because of the bug I mentioned above
Were you going to update the version in your PR? Then I can merge it and mine after and we’ll see if that helps
Christopher Davenport
@ChristopherDavenport
It's indeed hanging.
Updated my PR for the version change.
Tim Spence
@TimWSpence
Well that’s promising! I’ll merge yours and then mine and we’ll see if that fixes it
Yes, I saw. Thank you!!
Christopher Davenport
@ChristopherDavenport
Hoping once you merge in your PR it won't hang that way and my doc can complete succesfully.
Tim Spence
@TimWSpence
Me too!
Yours is merged. Thanks very much! Just updating my branch now
Christopher Davenport
@ChristopherDavenport
I'm opting for straight code for the first pass, and then I'll add more complex instructions. I'm breaking from the paper in that I want it to compile in-line. So Rather than sketching api's and later filling it out, instead just creating them and explaining how they suit the purpose.
(Not sure if this is the best approach, but the papers approach is definitely not very friendly to repl style development)
Tim Spence
@TimWSpence
merged crosses fingers
I honestly can’t remember how the paper structures the example. Is it not a direct translation?
Christopher Davenport
@ChristopherDavenport
It is a translation, with a few changes. I could do it 1 for 1 but it would be non-idiomatic scala.