3 ms·
Author of go-sct here. It's totally true that it increased the LOC and is heavily based on C. There's a number of limitations in cgo such as not being able to u
by d4l3k 11y ago
Author of go-sct here. It's totally true that it increased the LOC and is heavily based on C. There's a number of limitations in cgo such as not being able to use macros which caused the LOC bump.
The primary reason I did this was I wanted to learn more about cgo since I haven't used it in any useful way before.
This also allows it to be easily installed instead of having to download a .c file and compiling it.
- asveikau 11y agoJust to be clear I am not opposed to what you did, by all means keep doing it. I just followed the link and didn't understand right away. It seemed kind of like a funny substitution. And probably a learning exercise that suddenly was on HN's front page.
- artifaxx 11y agoThanks for putting this out there though. It was valuable to read and learn from this since I will probably end up implementing similar things in the future. It definitely seems like a valuable thing to post experimentation like this.
- masklinn 11y agoDoesn't cgo allow for using sct.c (possibly slightly tweaked e.g. removed/renamed main and added header) more or less directly rather than have to reimplement it?