Skip to content

Instantly share code, notes, and snippets.

@Perelandric
Perelandric / clone_generic.pony
Last active August 15, 2016 13:45
Unable to get clone method in generic type to compile
actor Main
new create(env: Env) => None
trait MyTrait
new create()
fun test(): MyTrait
class Foo is MyTrait
@Perelandric
Perelandric / clone_generic_2.pony
Last active August 17, 2016 18:43
Trying to make generic class with clone method
actor Main
new create(env: Env) =>
let foo_layers = Layers[Foo] // `Layers` of `Foo`
// The important part is that it defines a clone()
trait MyTrait[U]
new create()
fun clone(): U
@Perelandric
Perelandric / test.go
Last active November 11, 2016 23:50
Statically link to pony library from Go project.
package main
/*
#cgo CFLAGS: -I${SRCDIR}/lib
#cgo CFLAGS: -I$PONYHOME/src/libponyrt/
#cgo LDFLAGS: ${SRCDIR}/lib/libtest.a
#cgo LDFLAGS: -L$PONYHOME/build/release -lponyrt
#cgo LDFLAGS: -lpthread
#cgo LDFLAGS: -ldl
@Perelandric
Perelandric / motion.log
Created June 16, 2018 23:43
confusing logging in motion
[0:motion] [NTC] [ALL] [Jun 16 18:30:17] motion_startup: Motion 4.1.1+dirty20180614-57944cd Started
[0:motion] [NTC] [ALL] [Jun 16 18:30:17] motion_startup: Using log type (ALL) log level (INF)
[0:motion] [INF] [ALL] [Jun 16 18:30:17] conf_output_parms: Writing configuration parameters from all files (1):
[0:motion] [INF] [ALL] [Jun 16 18:30:17] Thread 0 - Config file: /usr/local/etc/motion/motion.conf
[0:motion] [INF] [ALL] [Jun 16 18:30:17] daemon off
[0:motion] [INF] [ALL] [Jun 16 18:30:17] process_id_file /var/run/motion/motion.pid
[0:motion] [INF] [ALL] [Jun 16 18:30:17] setup_mode off
[0:motion] [INF] [ALL] [Jun 16 18:30:17] logfile /home/mainuser/motion/tmp/motion.log
[0:motion] [INF] [ALL] [Jun 16 18:30:17] log_level 7
[0:motion] [INF] [ALL] [Jun 16 18:30:17] log_type all