SodiumFRP / sodium

Sodium - Functional Reactive Programming (FRP) Library for multiple languages
http://sodium.nz/
Other
848 stars 138 forks source link

New C# Implementation #84

Closed jam40jeff closed 8 years ago

jam40jeff commented 8 years ago

I have rewritten to C# implementation to be based off the newest Java code.

Also, in addition to reproducing all of the Java tests, I have included all test cases from the Denotational Semantics PDF as well as a couple memory tests (using dotMemory Unit). I plan to add more memory tests in the future as subtle differences in the way disposal and garbage collection of streams, cells, and listeners is handled are the only differences between the Java and C# versions.

Note that the dotMemory Unit tests are in a separate project so that they may be skipped if JetBrains dotMemory is not installed. Also, the Sodium.Tests.Internal tests project has access to symbols with the internal access modifier in the Sodium project, whereas Sodium.Tests does not (to ensure that this project only tests the public API).

the-real-blackh commented 8 years ago

Wow - that's great! Thank you so much. I've invited you to join the Sodium project.

the-real-blackh commented 8 years ago

Did you intend to check in your PetrolPump work? If you do check it in, put it in book/petrol-pump/c# because that's where the book text says to look.

jam40jeff commented 8 years ago

I plan on doing that soon. I actually had a question about that. Should I also base the PetrolPump code off the Java version? I ask because the existing C# PetrolPump code differed somewhat in structure from the Java version and I wasn't sure if that was just because it was old or if it was intentional.

the-real-blackh commented 8 years ago

Oh right - I get it. That was old code. I think that's mainly because it's old. I had to change the code a lot while writing the book. The text is all done now so there won't be any more changes.

the-real-blackh commented 8 years ago

Yes - so please base it off the Java version, which won't change now. I'm just finding out whether I can keep the name "petrol pump". I might have to rename it to "gas pump". Should find out in the next couple of days.

the-real-blackh commented 8 years ago

The name isn't changing.

jam40jeff commented 8 years ago

Thanks for letting me know.

Would you like me to commit the PetrolPump to a feature branch and merge to master when I'm done, or should I just commit directly to master?

the-real-blackh commented 8 years ago

I'm happy for you to commit directly to master. Nothing else depends on it building.

iCodeIT commented 8 years ago

I am happy to see somebody updating the C# code - I did the original port, and have meant to do an update for a while - and also to finish the petrol pump... it just seems something else keep coming up. I look forward to see what you have done!

jam40jeff commented 8 years ago

Thanks! And thank you for your original version. If not for having a C# version out there to play around with, I may not have gotten interested in the Sodium project. Also, it helped me get over some stumbling blocks while porting the new Java code.