Skip to content

Instantly share code, notes, and snippets.

package main
import (
"flag"
"fmt"
"io"
"os"
)
func cat(f io.Reader, s string) {
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include <u.h>
#include <libc.h>
#include "go.h"
#include "y.tab.h"
#include <ar.h>
***************************************LLVM-TIP****************************************************
Target/X86/X86FrameLowering.h:44: void adjustForSegmentedStacks(MachineFunction &MF) const;
Target/X86/X86ISelLowering.cpp:578: else if (TM.Options.EnableSegmentedStacks)
Target/X86/X86ISelLowering.cpp:9990: getTargetMachine().Options.EnableSegmentedStacks) &&
Target/X86/X86ISelLowering.cpp:10004: if (getTargetMachine().Options.EnableSegmentedStacks) {
Target/X86/X86ISelLowering.cpp:13868: assert(getTargetMachine().Options.EnableSegmentedStacks);
Target/X86/X86FrameLowering.cpp:702: !MF.getTarget().Options.EnableSegmentedStacks) { // Regular stack
Target/X86/X86FrameLowering.cpp:1419: X86FrameLowering::adjustForSegmentedStacks(MachineFunction &MF) const {
CodeGen/PrologEpilogInserter.cpp:694: if (Fn.getTarget().Options.EnableSegmentedStacks)
CodeGen/PrologEpilogInserter.cpp:695: TFI.adjustForSegmentedStacks(Fn);
/*
* Copyright © 2008-2011 Kristian Høgsberg
* Copyright © 2010-2011 Intel Corporation
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that the above copyright notice appear in
* all copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of
* the copyright holders not be used in advertising or publicity
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cgdb configure 20130528, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr
## --------- ##
## Platform. ##
#include <u.h>
#include <libc.h>
#include <bio.h>
char dayw[] =
{
" S M Tu W Th F S"
};
char *smon[] =
{
@mortdeus
mortdeus / pointers.go
Last active December 20, 2015 11:08
a few pointer pointers.
package main
import "fmt"
func main() {
a := 0
b := 0
// a and b's address that points to where they are located in memory.
uniform float uAmbient;uniform float uBumpDensity; // glman slider uniform variablesuniform float uBumpSize;uniform vec4 uSurfaceColor;uniform float uAng;uniform float uHeight;in vec3 vBTNx, vBTNy, vBTNz;in vec3 vLightDir;in vec2 vST;out vec4 fFragColor;const float PI = 3.14159265;float Cang, Sang;vec3ToXyz( vec3 btn ){ float xp = btn.x*Cang - btn.y*Sang; // rotate by +Ang btn.y = btn.x*Sang + btn.y*Cang; btn.x = xp; btn = normalize( btn ); vec3 xyz; xyz.x = dot( vBTNx, btn ); // convert surface local to // eye coords xyz.y = dot( vBTNy, btn ); xyz.z = dot( vBTNz, btn ); return normalize( xyz );}void main( ){ vec2 st = vST; // locate the bumps based on (s,t) float Swidth = 1. / uBumpDensity; float Theight = 1. / uBumpDensity; float numInS = floor( st.s / Swidth ); float numInT = floor( st.t / Theight ); vec2 center; center.s = numInS * Swidth + Swidth/2.; center.t = numInT * Theight + Theight/2.; st -= center; // st is now wrt the center of the bump Cang = cos(uAng);Sang = sin(uAn
time go get -u -v -a github.com/BurntSushi/wingo
github.com/BurntSushi/wingo (download)
code.google.com/p/jamslam-freetype-go (download)
github.com/BurntSushi/gribble (download)
github.com/str1ngs/ansi (download)
github.com/BurntSushi/xgb (download)
github.com/BurntSushi/xgbutil (download)
github.com/BurntSushi/xdg (download)
code.google.com/p/graphics-go (download)
runtime
@mortdeus
mortdeus / Map_Slice.go
Created November 3, 2013 04:45
Interesting little construct that matches a Map to a Slice.
package main
import "fmt"
func main() {
v := map[int]string{
3: "Quz",
0: "Foo",
2: "Baz",