Skip to content

Instantly share code, notes, and snippets.

@0xe2597668ccd0fb6a;
struct MonteValue {
union {
null @0 :Void;
bool @1 :Bool;
int @2 :Int32;
bigint @3 :Data;
double @4 :Float64;
bytes @5 :Data;
@zenhack
zenhack / go-generics-using-interfaces-instead-of-contracts.md
Last active September 29, 2020 22:32
Go Generics: A Concrete Proposal Re: Using Interfaces Instead Of Contracts.

Introduction

About a month and a half ago, the Go team released [draft designs][1] for changes in Go 2. One of these discusses adding parametric polymorphism ("generics") to Go. Many people have pointed out (and I agree) that the new "contracts" concept has several problems, including:

  1. It does not not encouraging expressing intent, as a contract is just a snippet of code that must type check. I and others worry that this will lead to a lot of under-specified APIs in the wild.
/* Print out a "clean" header for use in bpf assembly, defining constants
we need from various system headers. `bpf_asm` will choke on the originals,
for two reasons:
1. They contain C code
2. The #defines use expressions, which `bpf_asm` doesn't understand.
Luckily, we *don't* need to do this for <sys/syscall.h>, since it has
neither of the above problems. */
@zenhack
zenhack / moc-irc-keystone-auth-discussion
Created June 23, 2016 22:43
#moc irc logs re: keystone auth
2016-06-08T16:16:56 *** isd <isd!~isd@172.56.4.12> has joined #moc
2016-06-08T16:19:43 <isd> gsilvis: working on the hil keystone auth backend. IIRC, our plan had been to just map openstack project names to hil project names. I'm looking at the keystonemiddleware docs, and while it exposes that, it's only unique per domain. thoughts on how to deal with that? You have a bit more of a handle on what all the various keystone notions are than I am.
2016-06-08T16:20:00 <isd> I'm not 100% on what a domain is in the context of keystone
2016-06-08T16:24:09 <gsilvis> domains are containers that can contain projects [and also users]
2016-06-08T16:24:24 <gsilvis> right now openstack hasn't really decided to deal with that per-domain problem
2016-06-08T16:24:34 <gsilvis> one option: hardcode haas to use a specific domain
2016-06-08T16:24:49 <gsilvis> not hardcode, rather---config option
2016-06-08T16:26:07 <isd> Just a thing in haas.cfg, and if it doesn't match reject it? That's something I'd thought of, probabl

Keybase proof

I hereby claim:

  • I am zenhack on github.
  • I am isd (https://keybase.io/isd) on keybase.
  • I have a public key whose fingerprint is C0B2 C432 638D AEB0 D707 15C7 F654 B8C7 D4CA 3CB8

To claim this, I am signing this object:

This document is a blueprint for the to-be-implemented authentication and authorization support in HaaS. Pull request #491 is tracking the implementation effort.

Conceptual Model

Authorization

  • Two kinds of authorization exist:
  • Admin authorization, which allows access to admin-only API calls
Traceback (most recent call last):
File "/home/isd/.local/bin/hy", line 9, in <module>
load_entry_point('hy==0.10.0', 'console_scripts', 'hy')()
File "/home/isd/.local/lib/python2.7/site-packages/hy/cmdline.py", line 295, in hy_main
sys.exit(cmdline_handler("hy", sys.argv))
File "/home/isd/.local/lib/python2.7/site-packages/hy/cmdline.py", line 283, in cmdline_handler
return run_file(options.args[0])
File "/home/isd/.local/lib/python2.7/site-packages/hy/cmdline.py", line 190, in run_file
import_file_to_module("__main__", filename)
File "/home/isd/.local/lib/python2.7/site-packages/hy/importer.py", line 71, in import_file_to_module
@zenhack
zenhack / gist:8167562
Created December 29, 2013 04:50
Untested changes to examples' makefiles.
diff --git a/doc/EXAMPLE/EFFECTIVATS/DiningPhil/Makefile b/doc/EXAMPLE/EFFECTIVATS/DiningPhil/Makefile
index 2950133..bb06eca 100644
--- a/doc/EXAMPLE/EFFECTIVATS/DiningPhil/Makefile
+++ b/doc/EXAMPLE/EFFECTIVATS/DiningPhil/Makefile
@@ -21,6 +21,10 @@ ATSCCFLAGS=-O2
#
######
+TARGET=test
+