Skip to content

Instantly share code, notes, and snippets.

View cquinn's full-sized avatar
🐴
Ponying away!

Carl Quinn cquinn

🐴
Ponying away!
View GitHub Profile
@cquinn
cquinn / design.go
Created May 31, 2019 02:24
This Goa v3 design produces code that won't compile: ../../gen/http/items/server/types.go:42:6: NewItemResponse redeclared in this block
package design
import (
. "goa.design/goa/v3/dsl"
)
var _ = API("gbug", func() {
Server("gbug", func() {
Host("development", func() {
URI("http://localhost:8000/gbug")
})

Keybase proof

I hereby claim:

  • I am cquinn on github.
  • I am cquinn (https://keybase.io/cquinn) on keybase.
  • I have a public key ASCrBlns52d4EUUpE8VxJEBHwGCemejcabiXZWDUOidPIwo

To claim this, I am signing this object:

@cquinn
cquinn / gist:ad5663cb827749c44548
Last active March 4, 2016 00:09
Pony 0.2.1 http.Client.apply() Segmentation fault
applying client
[New Thread 0x1207 of process 60223]
[New Thread 0x1317 of process 60223]
[New Thread 0x1427 of process 60223]
[New Thread 0x1807 of process 60223]
Program received signal SIGSEGV, Segmentation fault.
0x0000000100025302 in has_flag (actor=0x0, flag=8 '\b') at src/libponyrt/actor/actor.c:33
33 return (actor->flags & flag) != 0;
(gdb) bt
@cquinn
cquinn / gist:babd8480b823606320a9
Last active March 4, 2016 00:10
Pony 0.2.1 http.Client.apply() Assertion failed
Assertion failed: (obj != NULL), function gc_recvobject, file src/libponyrt/gc/gc.c, line 158.
[New Thread 0x1413 of process 60217]
[New Thread 0x1503 of process 60217]
[New Thread 0x1603 of process 60217]
[New Thread 0x1703 of process 60217]
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x1413 of process 60217]
0x00007fff8bf51002 in __pthread_kill () from /usr/lib/system/libsystem_kernel.dylib
(gdb) bt
@cquinn
cquinn / fizzbuzz.pony
Created July 5, 2015 23:39
Minimalistic FizzBuzz in Pony lang
use "collections"
actor Main
new create(env: Env) =>
try
let n = env.args(1).i32()
for i in Range[I32](1, n) do
env.out.print(fizzbuzz(i))
end
end
@cquinn
cquinn / Expandy.groovy
Created August 14, 2012 17:27
Extended Groovy Expando class that has equals and hashCode
// Experimental object that could hold general report results.
class Expandy extends Expando {
boolean equals(Object o) {
if (getProperties().size() != o.getProperties().size()) return false
for (def i = getProperties().entrySet().iterator(); i.hasNext(); ) {
def e = i.next()
if (!o.getProperties().containsKey(e.getKey())) return false
def ov = o.getProperty(e.getKey())
if (ov != e.getValue()) return false
}