This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate: | |
https://github.com/DanB91/Zig-Playdate-Template | |
The rest of this is preservied for historical reasons: | |
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform. | |
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A small SSH daemon providing bash sessions | |
// | |
// Server: | |
// cd my/new/dir/ | |
// #generate server keypair | |
// ssh-keygen -t rsa | |
// go get -v . | |
// go run sshd.go | |
// | |
// Client: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <iostream> | |
#include <stdexcept> | |
using namespace std; | |
/* | |
* "A partially specialized non-type argument expression shall not involve a | |
* template parameter of the partial specialization except when the argument | |
* expression is a simple identifier." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <utility> | |
#include <tuple> | |
using namespace std; | |
// | |
// forward declare | |
// | |
template<int N1, int N2, int LAST, typename T> |