Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

*Sanjoy Das started off by giving an introduction to Haskell.
**Two models on which programming languages are based - the imperative model, and the languages that operate on re-write rules (e.g. Haskell).
** Haskell is referentially transparent.
** The compiler blindly applies a few re-write rules.
** A virtual type called real world. Each time there is an input, the compiler maps the previous real world to the present real world.
** Referential transparency.
** (Anurag Priyam elaborates on functional and declarative languages)
** Scheme is not referentially transparent.
@sa1
sa1 / hammingweight.c
Created November 11, 2011 22:04
Hamming Weight Timer for 64 bit Intel PCs (SSE 4.2)
// Hamming Weight timer on 64 bit PCs.
#include <stdio.h>
#include <smmintrin.h>
#include <stdint.h>
#include <limits.h>
#define PROC_SPEED 3410884000.0
#define NO_INSTRUCTIONS 1000000000
#define TIME(function) do { \
start = timer(); \
@sa1
sa1 / gist:5457832
Created April 25, 2013 06:08
Rosella Test Results
WARNING: using extern 'file'; is deprecated, use $loadlib instead. near "io_ops" at setup.winxed line 1
t/core/Error.t ...................................... ok
t/core/Function.t ................................... ok
t/core/Globals.t .................................... ok
t/core/IO.t ......................................... ok
t/core/ObjectFactory.t .............................. ok
t/core/Parrot.t ..................................... ok
t/core/Rosella.t .................................... ok
t/core/Version.t .................................... ok
t/winxed_test/Basic.t ............................... ok
@sa1
sa1 / gist:5457911
Created April 25, 2013 06:32
Rosella test results
t/core/Error.t ................................................ ok
t/core/Function.t ............................................. ok
t/core/Globals.t .............................................. ok
t/core/IO.t ................................................... ok
t/core/ObjectFactory.t ........................................ ok
t/core/Parrot.t ............................................... ok
t/core/Rosella.t .............................................. ok
t/core/Version.t .............................................. ok
t/winxed_test/Basic.t ......................................... ok
t/winxed_test/Nested.t ........................................ not ok (Failed 4 / 4)
@sa1
sa1 / gist:5463177
Created April 25, 2013 21:08
winxed TemplateEval.t
WARNING: class Rosella.Template.Engine not found at compile time near Rosella at t/template/TemplateEval.t line 8
1..5
not ok 1 - Eval Empty
# invoke() not implemented in class 'PackfileView'
# Called from 'render' (rosella/template.winxed : 1233)
# Called from 'render' (rosella/template.winxed : 1078)
# Called from '__generate_internal' (rosella/template.winxed : 420)
# Called from '' (t/template/TemplateEval.t : 9)
# Called from '' (rosella/test.winxed : 1063)
# Called from 'execute_test' (rosella/test.winxed : 837)
@sa1
sa1 / gist:5463200
Created April 25, 2013 21:11
winxed Nested.t
not ok 1 - test_1
# Null PMC access in find_method('subtest')
# Called from 'test_1' (t/winxed_test/Nested.t : 16)
# Called from 'execute_test' (rosella/test.winxed : 837)
# Called from '__run_test' (rosella/test.winxed : 861)
# Called from 'run' (rosella/test.winxed : 812)
# Called from 'test' (rosella/test.winxed : 1127)
# Called from 'main' (t/winxed_test/Nested.t : 50)
# Called from '__PARROT_ENTRY_WINXED_main' ( : 0)
# Called from '(entry)' ( : 0)
@sa1
sa1 / gist:5468408
Last active February 19, 2016 20:41
Parrot schedule

Abstract

This project is aimed at providing a complete low-level (PIR) binding to the libgit2 0.18 API, as well as a higher-level Winxed binding along with documentation and tests.

Details

This project aims to provide bindings to libgit2 for the Parrot Virtual Machine. This would allow all languages that run on Parrot to access libgit2 by loading a minimal amount of bytecode. There is already some existing [code][1] which provides bindings to libgit2 but this needs to be updated to the latest stable version of libgit2, tests and documentation need to be added for additional languages including Perl and NQP. The project would aim at providing updated bindings along with documentation and tests. There would also be an OO interface to the bindings including classes for git repositories, objects(commits, trees, blobs, tags), index and refs among others.

Schedule

@sa1
sa1 / gist:7786723
Last active December 30, 2015 05:59
Testing Rakudo with parrot patched with GH#1027
1. Clone Rakudo
$ git clone https://github.com/rakudo/rakudo.git
2. Clone Parrot and apply pull request #1027
$ cd rakudo
$ git clone https://github.com/parrot/parrot.git --depth=1
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 5. in line 1.
TrialID,Status,Title,Date
NCT03110744,Not recruiting,CDK4/6 Inhibition in Locally Advanced/Metastatic Chordoma,,
NCT03127215,Not recruiting,Study of Olaparib/Trabectedin vs. Doctor's Choice in Solid Tumors,,
NCT03001596,Not recruiting,Comparison Between NCRT and NCT Followed by MIE for Treatment of Locally Advanced Resectable ESCC,,
ISRCTN46099296,Recruiting,Bridging the age gap in breast cancer,,
NCT02949258,Not recruiting,Neoadjuvant Chemotherapy With SEEOX Regimen for Borrmann Type 4 Gastric Cancer,,
IRCT201508201031N15,Not Recruiting,Facial contour deformities,,
JPRN-UMIN000022850,Not Recruiting,Estimation of 10B concentration in boron neutron capture therapy: potential of image-guided therapy using 18FBPA PET,,
NCT02759536,Recruiting,In-hospital Neutron Irradiator (IHNI)-Based Boron Neutron Capture Therapy (BNCT) in the Treatment of Malignant Melanoma,,
JPRN-JapicCTI-111601,Not Recruiting,A randomized double-blind placebo-controlled study of secukinumab to demonstrate the efficacy at 24 weeks and to ass

Keybase proof

I hereby claim:

  • I am sa1 on github.
  • I am sa1 (https://keybase.io/sa1) on keybase.
  • I have a public key ASBHEWekc2OweddN-Kkgibteuv7cUnu3EGnwJJ7clJtrzAo

To claim this, I am signing this object: