This file contains 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 ( | |
"labix.org/v2/mgo" | |
"html/template" | |
"net/http" | |
"log" | |
"./signup" | |
) |
This file contains 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
diff -r 2d8bc3c94ecb src/cmd/gc/lex.c | |
--- a/src/cmd/gc/lex.c Fri Sep 21 17:10:44 2012 -0500 | |
+++ b/src/cmd/gc/lex.c Sat Jan 19 18:25:39 2013 +0400 | |
@@ -2200,7 +2200,7 @@ | |
// errors if a conflicting top-level name is | |
// introduced by a different file. | |
if(!s->def->used && !nsyntaxerrors) | |
- yyerrorl(s->def->lineno, "imported and not used: \"%Z\"", s->def->pkg->path); | |
+ warnl(s->def->lineno, "imported and not used: \"%Z\"", s->def->pkg->path); | |
s->def = N; |
This file contains 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
(gdb) info locals | |
&id = 1073746000 | |
(gdb) p id | |
No symbol "id" in current context. | |
in code: | |
id := C.struct_lala{v: 1} |
This file contains 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
struct my { | |
void (*f)(); | |
}; |
This file contains 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 ( | |
"encoding/json" | |
"math" | |
"time" | |
"github.com/labstack/echo" | |
"github.com/labstack/gommon/log" | |
) |
This file contains 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
def f1(s): | |
# Python 2: ok | |
# Python 3: TypeError: ord() expected string of length 1, but int found (it returns int for binary string) | |
# RPython : ok | |
return ord(s[0]) | |
def f2(s): | |
# Python 2: ok | |
# Python 3: ok | |
# RPython : Blocked block -- operation cannot succeed: v1 = ord(v0) |
This file contains 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
[translation:ERROR] Error: | |
[translation:ERROR] Traceback (most recent call last): | |
[translation:ERROR] File "/Users/aleksi/Soft/pypy/pypy/translator/goal/translate.py", line 308, in main | |
[translation:ERROR] drv.proceed(goals) | |
[translation:ERROR] File "/Users/aleksi/Soft/pypy/pypy/translator/driver.py", line 791, in proceed | |
[translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) | |
[translation:ERROR] File "/Users/aleksi/Soft/pypy/pypy/translator/tool/taskengine.py", line 116, in _execute | |
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) | |
[translation:ERROR] File "/Users/aleksi/Soft/pypy/pypy/translator/driver.py", line 285, in _do | |
[translation:ERROR] res = func() |
This file contains 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
#! /usr/bin/env ruby | |
STDOUT.sync = true | |
STDERR.sync = true | |
def run(cmd, *ok_statuses) | |
puts "\n=========> #{cmd}" | |
system(cmd) | |
unless ([0] + ok_statuses).include?($?) | |
puts "Exit status: #{$?}" |
This file contains 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
count = 10000 | |
size = 100 // megabytes | |
hosts = ['host1', 'host2', 'host3', 'host4', 'host5'] | |
facilities = ['Server', 'Client', 'Proxy'] | |
chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz '.split(''); | |
speed = 1500.0; // messages per second | |
start = new Date().getTime() - 24*60*60*1000; |
This file contains 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
puts "\n#{RUBY_ENGINE} #{RUBY_VERSION}:" | |
def run_tests | |
[ | |
"now.strftime('%L')", | |
"now.strftime('%N')", | |
"now.strftime('%Q')", | |
"now.to_datetime.strftime('%L')", | |
"now.to_datetime.strftime('%N')", | |
"now.to_datetime.strftime('%Q')", |