Skip to content

Instantly share code, notes, and snippets.


Ramsey Nasser nasser

Block or report user

Report or block nasser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nasser / ajeeb.ts
Created Apr 15, 2019
rough cut of the ajeeb framework and ecs
View ajeeb.ts
type Entity = number
export class ComponentStore {
name: string // for debugging
entities: Array<Entity>;
indices: Array<number>;
components: Array<any>;
size: number;
constructor(name:string) {
View index.html
<title>Simple Line Graph using SVG and d3.js</title>
<script src="d3.v2.js"></script>
html, body {
background: white;
/* tell the SVG path to be a thin blue line without any area fill */
path {
View julia.clj
;; based on
;; no idea why System.Drawing.dll is not normally findable, this should be
;; (import "System.Drawing")
(import-from "/lib/mono/gac/System.Drawing/")
(use "System.Drawing")
(use "System.Drawing.Imaging")
(defn >> [^Int32 x ^Int32 y]
(cil* Int32 (ldarg-0) (ldarg-1) (ldc-i4-s (const 31b)) (and) (shr)))
nasser / mandelbrot.clj
Last active Feb 9, 2019
Mandelbrot Renderer Script in Jn
View mandelbrot.clj
;; based on
;; no idea why System.Drawing.dll is not normally findable, this should be
;; (import "System.Drawing")
(import-from "/lib/mono/gac/System.Drawing/")
(use "System.Drawing")
(use "System.Drawing.Imaging")
;; should be in stdlib
(defn jn.core/- [^Double a ^Double b]
(cil* Double (ldarg-0) (ldarg-1) (sub)))
View temp.ll
; Function Attrs: uwtable
define hidden cc16 float @DynVsIface_Benches_ThroughExact_DynVsIface_TaskDoer(i64* %this, i64* %arg_doer) #3 {
br label %BB3
BB3: ; preds = %BB0
br label %BB2
BB2: ; preds = %BB3
%0 = load volatile i64* %arg_doer
nasser /
Created Nov 2, 2018
Primitive Type Names on the CLR

Primitive types on the Common Language Runtime have different names depending on who you ask

  • CIL names used in Common Intermediate Language bytecode instructions like ldc.* and conv.*
  • CTS names used in the Common Type System that underlies languages running on the CLR
  • .NET names used in the .NET framework. These are the names of the classes that correspond to the primitive types, and will show up in stack traces and reflection.
  • C# names used in C# syntax
  • F# names used in F# syntax

| CIL | CTS | .NET | C# | F# |

View clojure.stacktrace.clj.dll.cs
using clojure.lang;
using clojure.lang.Runtime;
using clojure.lang.Runtime.Binding;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
nasser / tent.js
Created Oct 15, 2018
minimal janky port of entt to js
View tent.js
function ComponentSet() {
this.entities = [];
this.indices = []; // could be a hashmap
this.components = [];
this.size = 0;
ComponentSet.prototype.insert = function (entity, component) {
View circle.cs
public static void Circle(int x0, int y0, int radius, uint c)
int x = radius;
int y = 0;
int dx = 1;
int dy = 1;
int err = dx - (radius << 1);
while (x >= y)
View pico.cs
using System;
using OpenTK.Graphics.OpenGL;
using OpenTK;
using OpenTK.Graphics;
namespace Pico
public class Demo
You can’t perform that action at this time.