Skip to content

Instantly share code, notes, and snippets.

@nelhage
Last active September 22, 2020 02:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nelhage/813a13bd7f5adfdcfca4fb17abb1c7d6 to your computer and use it in GitHub Desktop.
Save nelhage/813a13bd7f5adfdcfca4fb17abb1c7d6 to your computer and use it in GitHub Desktop.
A Go/C polyglot
// \
/*
#include <stdio.h>
int main() {
printf("Hello, World from C!\n");
return 0;
}
#if 0
//*/
package main
import "fmt"
func main() {
fmt.Println("Hello, World from Go")
}
// \
/*
#endif
//*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment