Skip to content

Instantly share code, notes, and snippets.

View ben-albrecht's full-sized avatar

Ben Albrecht ben-albrecht

View GitHub Profile
This file has been truncated, but you can view the full file.
.\" Man page generated from reStructuredText.
.
.TH "CHAPEL" "1" "July 07, 2016" "" "Chapel Language Documentation 1.13"
.SH NAME
chapel \- Chapel Documentation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
#!/usr/bin/env python
from __future__ import print_function
from argparse import ArgumentParser
parser = ArgumentParser(prog='arg-parse testing')
parser.add_argument("-compopts","--compopts", action="append", dest="compopts")
strings = [
'--compopts --fast',
@ben-albrecht
ben-albrecht / tree.dat
Last active March 9, 2017 23:00
`tree -d $CHPL_HOME/test`
├── Logs
├── Nodes
├── Samples
│   ├── Correctness
│   └── Performance
├── arrays
│   ├── bradc
│   │   ├── arrOfArr
│   │   ├── arrOfDom
│   │   ├── errors
// Generated with c2chapel version 0.1.0
// Header given to c2chapel:
require "sqlite3.h";
// Note: Generated with fake std headers
// #define'd integer literals:
// Note: some of these may have been defined with an ifdef
extern const SQLITE_VERSION_NUMBER : int;
/*
Compiled with:
chpl sql-example.chpl -L$(brew --prefix sqlite)/lib -lsqlite3 -I$(brew --prefix sqlite)/include -o sql-example
*/
use SQLite3;
// TODO: Write this in Chapel
require "callback.h";
/*
@ben-albrecht
ben-albrecht / pychapel-osx.patch
Created August 7, 2017 16:14
Patch to PyChapel to make OSX work
diff --git a/module/configs/pych.json b/module/configs/pych.json
index 82f3b00..2d1019d 100644
--- a/module/configs/pych.json
+++ b/module/configs/pych.json
@@ -81,7 +81,6 @@
"cflags": [
"--fast",
"--library",
- "--static",
"-searlyShiftData=false"
@ben-albrecht
ben-albrecht / pychapel-osx.patch
Created August 7, 2017 16:14
Patch to PyChapel to make OSX work
diff --git a/module/configs/pych.json b/module/configs/pych.json
index 82f3b00..2d1019d 100644
--- a/module/configs/pych.json
+++ b/module/configs/pych.json
@@ -81,7 +81,6 @@
"cflags": [
"--fast",
"--library",
- "--static",
"-searlyShiftData=false"
@ben-albrecht
ben-albrecht / pychapel-osx.patch
Created August 7, 2017 16:14
Patch to PyChapel to make OSX work
diff --git a/module/configs/pych.json b/module/configs/pych.json
index 82f3b00..2d1019d 100644
--- a/module/configs/pych.json
+++ b/module/configs/pych.json
@@ -81,7 +81,6 @@
"cflags": [
"--fast",
"--library",
- "--static",
"-searlyShiftData=false"
use Time;
use IO;
config const toolbarWidth = 40;
proc main() {
const D = {1..1000000};
var arr: [D] real;
writeln('Populating array');
/* Printing pretty colors in Chapel */
module Colors {
// C color codes
param RESET = "\x1B[0m",
BOLD = "\x1B[1m",
UNDERLINE = "\x1B[4m",
GRN = "\x1B[32m",
YEL = "\x1B[33m",
BLU = "\x1B[34m",