This file contains hidden or 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
| 1. Founder has all permissions. | |
| 2. Everyone in the chatroom can verify that public key X is indeed founder's key, it's a property of the chatroom and no peer stores it i.e. the chatroom itself contains that information somewhere, presumably in its ID (we don't rely on chatroom peers storing that data because they can came up with whatever they want i.e. say that the key X is not founder's key; we want that verification to be 100% exact and to work with even 1 peer in the chatroom). | |
| 3. To give permissions to user A, founder gives user A data which tells what permission level does A have (if we are going to have permission levels in tox at all). The data is signed by founder's private key. | |
| 4. Now A can show anyone that signed by founder data from the step (3) as a proof of her having permissions (anyone can verify that it was indeed signed by founder by (2)), so A can exercise her rights over everyone in the chatroom. | |
| 5. If A gives permissions to B, 1) A sends her founder-signed data to B to show that she i |
This file contains hidden or 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
| .PHONY: all clean cover cpu editor internalError later mem nuke todo | |
| grep=--include=*.go --include=*.l --include=*.y | |
| all: editor | |
| go vet | |
| golint | |
| make todo | |
| clean: |
This file contains hidden or 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
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net/http" | |
| "time" | |
| "github.com/braintree/manners" | |
| "github.com/xlab/closer" |
This file contains hidden or 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
| // Copyright 2013 The Go-SQLite Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package sqlite3 | |
| /* | |
| #include "sqlite3.h" | |
| */ | |
| import "C" |
This file contains hidden or 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
| $ go run main.go |
This file contains hidden or 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
| #pragma once | |
| enum Options { | |
| One, Two, Three | |
| }; | |
| const char *hello = "hello world!"; | |
This file contains hidden or 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
| localhost(~/src) % gccgo -v | |
| Using built-in specs. | |
| COLLECT_GCC=gccgo | |
| COLLECT_LTO_WRAPPER=/opt/libexec/gcc/arm-linux-gnueabihf/4.8.2/lto-wrapper | |
| Target: arm-linux-gnueabihf | |
| Configured with: ../gccgo/configure --prefix=/opt --enable-languages=c,c++,go --with-ld=/usr/bin/ld --enable-shared --without-included-gettext --enable-threads=posix --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --with-system-zlib --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf | |
| Thread model: posix | |
| gcc version 4.8.2 20130927 (prerelease) (GCC) | |
| localhost(~/src) % go run -compiler gccgo helloworld.go | |
| Hello gccgo |
This file contains hidden or 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
| char a1; // type of a1 is C.char | |
| char *a2; // type of a2 is *C.char | |
| char a3[1]; // type of a3 is [1]C.char | |
| char a4[1][2]; // type of a4 is [1][2]C.char | |
| char a5[1][2][3]; // type of a5 is [1][2][3]C.char | |
| char *a6[1][2][3]; // type of a6 is [1][2][3]*C.char | |
| char **a7[1][2][3]; // type of a7 is [1][2][3]**C.char | |
| char ***a8[1][2]; // type of a8 is [1][2]***C.char | |
| char *a9[1][2]; // type of a9 is [1][2]*C.char | |
| char **a10[1]; // type of a0 is [1]**C.char |
This file contains hidden or 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
| package main | |
| import ( | |
| "./binding" | |
| "fmt" | |
| ) | |
| func main() { | |
| binding.PrintHello() | |
| binding.Seed(1) | |
| fmt.Println(binding.Random()) |
This file contains hidden or 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
| Говорил Керниган Пайку: Ты погодь язык свой писать, покамест три книжки со мной в соавторстве не напишешь! | |
| Написал Роб Пайк один язык с каналами, отнес его Кернигану, а тот лишь в бороду ухмыляется | |
| Рассстроился молодой Роб, но виду не подал. | |
| Пошел писать терминал графический и вышел он у него краше некуда. Да только к тому времени люди про терминалы уже и думать забыли (edited) | |
| Тогда решил уже повзрослевший Пайк второй язык написать, да не просто написать а в наикрутейшем редакторе | |
| А так как такого не было, написал свой | |
| А потом написал в нем второй свой язык. | |
| И пошел гордый собой свой язык, написанный в новом супер редакторе Кернигану показывать | |
| А тот как увидел – стал языком цокать, да только не на язык глядючи, а на редактор. | |
| Хорош у тебя редактор вышел, говорит. Молодец! |