Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Go wrappers for MBA<2> #16

Merged
merged 3 commits into from
Jun 14, 2021
Merged

Add Go wrappers for MBA<2> #16

merged 3 commits into from
Jun 14, 2021

Conversation

yonch
Copy link
Contributor

@yonch yonch commented Jun 14, 2021

Thank you for open-sourcing this implementation! It had been a pleasure to work with on a Python project.

I wanted to use MBA<2> in Golang, so wrote these wrappers using cgo...

Verified using tests (in golang_mba_test.go):

  • a port of the "small test function" test in test_mba.cpp
  • generated several values using the interp Python example in the README, the Golang test then expects to generate the exact same values for the same inputs.

This implementation also support the functionality through Python's __repr__ via the String() function on the Mba2 struct.

I hope to continue contributing further fixes or enhancements in case those come up.

Thanks again for open sourcing!

@ddemidov
Copy link
Owner

Thank you for the contribution! Does it need any changes in the CMakeLists.txt to build the new test?

@yonch
Copy link
Contributor Author

yonch commented Jun 14, 2021

I test manually by running go test in the mba folder, but it will be good to add to the CMakeLists.txt if it's part of your workflow -- I'll go ahead and add that

install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should not be a problem with out-of-source builds, but ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, I usually build out of build too. fixed it on autopilot..

@ddemidov ddemidov merged commit 33f3b02 into ddemidov:master Jun 14, 2021
@ddemidov
Copy link
Owner

Thanks again!

@yonch
Copy link
Contributor Author

yonch commented Jun 14, 2021

thank you for the quick turnaround!! hope to contribute more in the future :)

@ddemidov
Copy link
Owner

I have applied fixes for the go tests on travis-ci in 15cbf8d (the logs are here). Hope the fixes make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants