Last active
August 29, 2015 14:21
-
-
Save d3m1gd/422c510053794569abfc to your computer and use it in GitHub Desktop.
pony hacky anywhere debug
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
class Dbg | |
new create | |
( a1: Stringable | |
, a2:(Stringable | None) = None | |
, a3:(Stringable | None) = None | |
, a4:(Stringable | None) = None | |
) => | |
let cs1 = a1.string().cstring() | |
let cs2 = match a2 | var z: None box => "".cstring() else a2.string().cstring() end | |
let cs3 = match a3 | var z: None box => "".cstring() else a3.string().cstring() end | |
let cs4 = match a4 | var z: None box => "".cstring() else a4.string().cstring() end | |
@printf[I32]("debug: %s %s %s %s\n".cstring(),cs1,cs2,cs3,cs4) | |
actor Main | |
new create(env: Env) => | |
Dbg("hello world") | |
Dbg(U64(1000050000), "anything stringable", I32(10), "up to 4 arguments") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment