Closed mstksg closed 9 years ago
Oh... I should probably use this opportunity to update the serialization scheme for StdGen
used in Control.Auto.Process.Random
too. This will also break existing serialized code, but it might be worth it.
Looking deeper at the implementation of StdGen
, it looks like it hides enough of the constructor to make it really impossible to reliably serialize well in a way that won't break in the future. Right now the only guarantee is that read . show == id
...this is the current serialization scheme (serialize the string, read the string). I could guess the format (right now, it's two Int32
s tupled together), and serialize it directly (parse the string and serialize the Int32
s), and deserialize by reconstructing (showing the two Int32
s) through read
...it's more costly time-wise but probably sliiiightly cheaper space-wise. But...the "format" of the string might change. The only guarantee of the library is that read.show == id
.
So I'm going to stick with the scheme.
Uploading new version when I wake up tomorrow.
Considering whether or not these now-few breaking changes then are worth a 0.3
update...maybe 0.2.1
is all that is needed?
Technically, following the Haskell PVP, you should increase to 0.3. I think it's OK to do this; version numbers are cheap and you can increase them whenever is needed. Just keep in mind that, as 'auto' has been on Hackage for only a couple of days and probably has not seen many "real world usage", the APIs are probably still subject to change as people start using it and suggesting changes, and many of those will probably be breaking changes so you will face similar decisions for a while until the API stabilizes while being used by a larger number of people with different needs.
Nevertheless, I should say that you've made a great job with the API, and maybe there won't be that much to change :) Il 01/apr/2015 08:27 "Justin Le" notifications@github.com ha scritto:
Considering whether or not these now-few breaking changes then are worth a 0.3 update...maybe 0.2.1 is all that is needed?
— Reply to this email directly or view it on GitHub https://github.com/mstksg/auto/issues/7#issuecomment-88446115.
Good call :)
I'll plan on releasing v0.3 either monday or tuesday; it'll be the first update that breaks backwards compatibility, but I'd rather have these changes come sooner rather than later, while we're still in pre-kinda-release pre-
v1.0
.Planned changes for sure, living on 18ab39c, HEAD:
State
/Writer
for functions inControl.Auto.Effects
stateA
,writerA
,readerA
Thanks to @k0001 for proposing and pushing these contributions ( #5 ).
Changes to be tested out still
accum
toaccuml
throughout the library and changing the type signature toaccuml :: (a -> b -> b) -> b -> Auto m a b
. Currently living on branch at 5c47ca4 . will be testing this out with existing projects to see if the new code is natural enough to warrant this rather large change. Tested and rejected; see #2StdGen
; this will break stuff, but might as well do it earlier. rejectedAny comments on these or possible other suggestions before the first breaking updates welcome :)