Skip to content

Instantly share code, notes, and snippets.

View nasser's full-sized avatar
🛰️
save-lisp-and-die

Ramsey Nasser nasser

🛰️
save-lisp-and-die
View GitHub Profile
@nasser
nasser / python.fsx
Last active November 30, 2020 20:54
Python from F#
// make sure codegen.py (https://github.com/CensoredUsername/codegen/blob/master/codegen.py) is in the same folder
// and you've added the IronPython package
open System.IO
open IronPython.Hosting
open IronPython.Runtime
open Microsoft.FSharp.Reflection
let engine = Python.CreateEngine()
@nasser
nasser / disassembly.cs
Created April 15, 2020 15:49
Reify Metadata Progress
public sealed class reify50835 : Counted, IObj
{
private readonly int x;
private readonly IPersistentMap <meta>;
private static IPersistentMap <static_meta>;
public reify50835(int num)
{
@nasser
nasser / disassembly.cs
Created April 14, 2020 21:58
Reify Progress
using clojure.lang;
using Magic;
using System;
using System.Reflection;
[assembly: AssemblyVersion("0.0.0.0")]
public class proxy19372 : Counted, IProxy
{
private readonly object yyy;
@nasser
nasser / disassembly.cs
Created April 10, 2020 21:14
Clojure proxy
using clojure.lang;
using Magic;
using System;
using System.Reflection;
[assembly: AssemblyVersion("0.0.0.0")]
public class proxy22351 : Random, Counted, IDeref, IProxy {
private readonly long y;
// closures and base type constructor arguments
// seed here is x in the clojure code, num is y
@nasser
nasser / disassembly.cs
Created April 7, 2020 18:40
MAGE Generators/Coroutines
using System;
using System.Reflection;
[assembly: AssemblyVersion("0.0.0.0")]
public class ManualCoro
{
private int <state>;
public void CoroutineMethod()
{
@nasser
nasser / code.clj
Last active April 7, 2020 02:00
MAGIC proxy
(let [x 0.5
m (proxy [Random clojure.lang.Counted] [100]
(count [] (* x (.Next this))))]
(dotimes [_ 100000]
(.Next m)
(.count m)))
@nasser
nasser / arithmetics.pegjs
Created March 29, 2020 22:08
arz parser generator example
/*
* Simple Arithmetics Grammar
* ==========================
*
* Accepts expressions like "2 * (3 + 4)" and computes their value.
*/
Expression
= head:Term tail:(_ ("+" / "-") _ Term)* {
var result = head, i;
@nasser
nasser / livecode-coc.md
Last active March 29, 2020 19:36
Livecode.NYC Code of Conduct

The Livecode.NYC Code of Conduct

All participants in the Livecode.NYC community, including the mailing list, discord server, meetups, performances, and workshops are required to agree with the following code of conduct. Organizers will enforce this code online and in person.

Short Version

Livecode.NYC is dedicated to providing harassment-free meetup, mailing list, discord and performance experiences for everyone, regardless of gender, gender identity and expression, age, sexual orientation, disability, physical appearance, body size, race, ethnicity, religion (or lack thereof), or technology choices. We do not tolerate harassment of community members in any form. Degrading sexual language and imagery is not appropriate in any Livecode.NYC context, including emails to the list, discord, performances, workshops, and the meetups. Members violating these rules may be sanctioned or expelled from the community at the discretion of the organisers.

Long Version

(clojure.core/case
"{wzB=&8LFE"
"{wzB=&8LFE"
0
"><L}V?$u6J"
1
"of*P5\"J\\D`"
2
"5#*}lv`]Qa"
3
wget -qO - https://source.unsplash.com/1920x1080/?minimal | feh --bg-fill -