Skip to content

Instantly share code, notes, and snippets.

View icholy's full-sized avatar
💥
breaking things

Ilia Choly icholy

💥
breaking things
View GitHub Profile
import random
import math
def rand7():
return random.randrange(1,8)
def rand5_mod():
return rand7() % 5 + 1
def rand5_recursive():
@icholy
icholy / ideas.md
Last active November 2, 2015 18:43

My Awesome Language

An imperative looking syntax for lisp.

Expressions (Find a way to avoid return)

 { return 1 }
var readline = require('readline');
type Expression = any;
class Thunk {
private forced = false;
private value: any;
constructor(
private fn: Function,
function shuffle<T>(o: T[]): T[] {
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
}
enum Door {
Zonk,
Prize
}
package main
import "time"
type Item struct {
time.Time
}
type RingBuffer struct {
items []*Item
@icholy
icholy / TSServer.py
Last active May 16, 2024 19:17
Python wrapper around TypeScript TSServer
#!/usr/bin/env python
#
# Copyright (C) 2015 Google Inc.
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

Here's what I'm doing to animate a linestring over time. It add points to the front while removing them from the tail. Think snake

var viewer = new Cesium.Viewer('mapContainer');

var positions = [];

function randomInRange(from, to) {
  return Math.random() * (to - from) + from;
}
declare module Cesium {
type RenderState = any;
interface Proxy {
getURL(resource: string): string;
}
class ArcGisImageServerTerrainProvider {
SongName ArtistName AlbumName
(New Wave) Poly [Mark Goodier Nirvana Incesticide
New Slang The Shins Oh, Inverted World
One Thing Finger Eleven Finger Eleven
Walk In Regret I Am The Architect Gate
Water On The Moon Aer Water On The Moon ( GoodMusicAllDay.com Mixtape)
Simon & Garfunkel!!s Sound of Silence Sound of Silence
Always Gold Radical Face The Family Tree: The Roots
Breezeblocks alt-J An Awesome Wave
Holography Retaliate
package main
import (
"log"
"urlparams"
)
func main() {
var (