Skip to content

Instantly share code, notes, and snippets.

cargo.toml:
[package]
name = "hello_world"
version = "0.0.1"
authors = ["PudgePacket <PudgePacket@gmail.com>"]
[dependencies.gl]
git = "https://github.com/bjz/gl-rs"
C:\Users\Trent\Desktop\blah\hello_world>cargo update gl -v
Updating git repository `https://github.com/bjz/gl-rs`
Unable to update https://github.com/bjz/gl-rs
Caused by:
failed to clone into: C:\Users\Trent\.cargo\git\db\gl-rs-5020f97825182d66
Caused by:
[2] SSL is not supported by this copy of libgit2.
C:\Users\Trent\Desktop\blah\hello_world>cargo update gl -v
Updating git repository `https://github.com/bjz/gl-rs`
Unable to update https://github.com/bjz/gl-rs
Caused by:
failed to clone into: C:\Users\Trent\.cargo\git\db\gl-rs-5020f97825182d66
Caused by:
[2] SSL is not supported by this copy of libgit2.
C:\Users\Trent\Desktop\blah\hello_world>cargo update gl -v
Updating git repository `https://github.com/bjz/gl-rs`
Unable to update https://github.com/bjz/gl-rs
Caused by:
Executing `git clone https://github.com/bjz/gl-rs C:\Users\Trent\.cargo\git\db
\gl-rs-5020f97825182d66 --bare --no-hardlinks --quiet` failed
Caused by:
Could not execute process `git clone https://github.com/bjz/gl-rs C:\Users\Tre
C:\Users\Trent\Desktop\blah\hello_world>cargo build
Updating git repository `https://github.com/bjz/gl-rs`
Updating git repository `https://github.com/netvl/rust-xml`
Compiling rust-xml v0.1.0 (https://github.com/netvl/rust-xml#361fc1ac)
Compiling khronos_api v0.0.1 (https://github.com/bjz/gl-rs#8bf7197a)
Build failed, waiting for other jobs to finish...
Could not compile `rust-xml`.
--- stderr
src\writer\mod.rs:1:38: 1:40 error: expected `;` but found `as`
# Grab your time module !
import time
# Capture the time at the start of your program
time_at_start = time.time()
# The code you want to time goes here
for i in range(1,billion):
foo()
blah()
#include <iostream>
void main() {
std::cout << "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91\n92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111\n112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131\n132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\n152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171\n172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191\n192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\n212\n213\n214\n215\n2
var chans = make(map[string]*chan string)
func Server() {
println("started server")
for {
var timeout = make(chan string, 1)
go func() {
time.Sleep(1 * time.Second)
timeout <- "timeout!"
}()
package main
import (
"encoding/json"
"fmt"
"io"
"log"
"strings"
)
package main
import (
"encoding/json"
"fmt"
"golang.org/x/net/websocket"
"net/http"
"strings"
"sync"
"time"