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
/* Generated by Nimrod Compiler v0.9.6 */ | |
/* (c) 2014 Andreas Rumpf */ | |
/* The generated code is subject to the original license. */ | |
/* Compiled for: MacOSX, amd64, clang */ | |
/* Command for C compiler: | |
clang -c -w -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */ | |
#define NIM_INTBITS 64 | |
#include "nimbase.h" | |
#include <string.h> |
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
INFO global: Vagrant version: 1.7.1 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.1/bin/vagrant" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_DETECTED_OS="Darwin" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1" | |
INFO global: VAGRANT_LOG="debug" |
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
######################### | |
# CODE INCLUDED BY BOTH | |
# COMPILATION UNITS. | |
# Trait definition | |
type DrawableVTable* = tuple[ | |
drawType: int, | |
preDraw: proc(self: ref TObject): bool {.nimcall.}, | |
draw: proc(self: ref TObject) {.nimcall.} | |
] |
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
import json, times, strutils | |
when isMainModule: | |
echo "Loading and parsing json" | |
let t1 = epochTime() | |
let j = parseFile("nimrod_performance.json") | |
assert (j.kind == JObject) | |
let t2 = epochTime() | |
echo "Took ", formatFloat(t2 - t1, ffDecimal, 2) |
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 python | |
import json | |
import time | |
print "Loading and parsing json" | |
t1 = time.time() | |
j = json.load(open("nimrod_performance.json", "rt")) | |
print j["pak_filename"] | |
t2 = time.time() |
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
## Convenience wrapper around raw `nimepak <nimepak.html>`_ module. | |
## | |
## The usual operation with these procs is to create a Tepak var and call | |
## init() on it to use it. You can call is_valid() at any time on a Tepak to | |
## check its validity. | |
import nimepak | |
export nimepak.F_BUF_SIZE | |
export nimepak.F_PACK_MAGIC |
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
proc doc1*(text: string) = | |
## Blah blah blah the blah | |
## | |
## Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah | |
## blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah | |
## blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah | |
## blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah | |
## blah blah blah blah blah blah blah blah blah blah blah blah | |
## | |
## Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah |
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
proc test1() = | |
raise newException(E_base, "Hey ho") | |
proc tester() = | |
except: echo "2. except block" | |
finally: echo "3. Finally block" | |
echo "1. Pre exception" | |
test1() | |
echo "NaN. Post exception" |
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
type | |
TNodeKind = enum PK_EMPTY, PK_INT, PK_STRING | |
TNode = object | |
case kind: TNodeKind | |
of PK_EMPTY: nil | |
of PK_INT: int_val: int | |
of PK_STRING: str_val: string | |
template new_node(kind: TNodeKind, expr): TNode {.immediate.} = |
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
type | |
Tparam_kind* = enum PK_EMPTY, PK_STRING | |
Tparsed_parameter* = object | |
case kind*: Tparam_kind | |
of PK_EMPTY: nil | |
of PK_STRING: str_val*: string | |
proc `$`*(data: Tparsed_parameter): string {.procvar.} = | |
case data.kind: |