Skip to content

Instantly share code, notes, and snippets.

@hatzka-nezumi
hatzka-nezumi / English.thue
Last active December 3, 2015 00:22
A Thue program generating sentences in English. Often makes nonsense, but grammatical nonsense. Has a very limited vocabulary. Made for http://lolwh.at/~amb/thue.html interpreter; won't work on others. (Creative Commons Zero/Unlicense)
[noun_common]::=man
woman
child
home
work
diet
parliament
government
German
island
@hatzka-nezumi
hatzka-nezumi / Beer.jl
Last active December 3, 2015 00:22
99 bottles of beer in Julia.
# 99 bottles of beer in Julia
# [email protected] - Creative Commons Zero or Unlicense
bottles = 99
s = "s"
while bottles > 0
println("$bottles bottle$s of beer on the wall,")
println("$bottles bottle$s of beer.")
println("Take one down, pass it around,")
bottles -= 1
@hatzka-nezumi
hatzka-nezumi / bcbrand.js
Last active November 7, 2016 20:17
Bittersweet Candy Bowl random button. https://www.vikomprenas.com/bcb-random/
// bcbrand.js - bcb.cat random button
// [email protected]
// This is free and unencumbered software released into the public domain. <http://unlicense.org/>
// Requires jQuery (tested on 1.11.3).
// <div id="bcbrand"></div>
jQuery(function bcbrandom(){
var $ = window.jQuery;
$("#bcbrand").html('<div id="bcbrand_status"></div><a id="bcbrand_link"></a><div id="bcbrand_name"></div><button type="button" id="bcbrand_chapter">Get a random chapter!</button>');
@hatzka-nezumi
hatzka-nezumi / levcal.js
Last active December 4, 2015 19:00
Levian calendar calculator. https://www.vikomprenas.com/levcal/
// Levian Calendar calculator
// Copyright (C) 2015 Vi Komprenas <[email protected]>
// This is free and unencumbered software released into the public domain. <http://unlicense.org/>
// Requires jQuery (tested on 1.11.3).
// <div id="levcal">Loading!</div>
jQuery(function levcal(){
var $ = window.jQuery;
var widgetcontent = "";
@hatzka-nezumi
hatzka-nezumi / unfairfrisk.js
Last active November 14, 2019 15:43
Unfair Frisk: Hey, if Undyne can do it... https://redd.it/4f2yeg - http://joezeng.github.io/fairdyne/
const uf_ver_string = "UF 1.0";
var uf_debug = false;
// ---- Introduction
// Based on actual fairdyne source
Scene.prototype.selectScene = function(name, data) {
this.scene_state = name;
this.scene_time = 0;
@hatzka-nezumi
hatzka-nezumi / confirmtrack.php
Last active December 5, 2016 03:06
Protect your users' privacy and security.
<?php
/* confirmtrack.php - protect your users' privacy and security
* by [email protected] - Creative Commons Zero
* Idea taken from medium.com
* to use, simply place links or iframes to this
* use the query string (GET) parameters:
* - 'url' for the url
* - 'name' for the name of the foreign service (optional)
* - 'reason' for the reason (see below) (optional)
* - 'oc' set to anything if this is your content (optional, if not added will disclaim ownership!)
@hatzka-nezumi
hatzka-nezumi / ,(= 5 2)
Created March 16, 2017 16:17
I've edited this to remove interspersed conversations. Original: https://gist.github.com/timmc/bef7b066ebdd54eb26dc04431cbe66f6
freenode/#clojure on 2014-04-21:
amalloy sets 5 to be 2 using reflection, probably in PM with clojurebot:
(let [field (nth (.getDeclaredFields Long) 3)] (.setAccessible field true) (.set field 5 2))
19:10 < amalloy> justin_smith: i think ''lovecraft should contain (alter-var-root #'defmacro (constantly (fn [& args] `(quote ~(rand-nth '#{various lovecraftian horrors|)))))
19:11 < justin_smith> ouch
19:11 < amalloy> or something like it, anyawy
19:11 < justin_smith> yeah
@hatzka-nezumi
hatzka-nezumi / humanize.js
Created April 28, 2017 01:45
Logic humanizer plugin (for Scripter)
// copyright 2017 ViKomprenas - Creative Commons Zero
var PluginParameters = [
{
name: "Velocity Range",
type: "lin",
defaultValue: 6,
minValue: 0,
maxValue: 127,
numberOfSteps: 127
@hatzka-nezumi
hatzka-nezumi / gng.rb
Created April 17, 2019 18:45
Glover & Glover notoriety simulation
#!/usr/bin/env ruby
require 'average'
simcount = 5000
sims = []
simcount.times do
puts "Starting simulation..."
stage = :none
ticks = 0

Identifiers in Various Languages

(Where I had to manually test something, I used godbolt. (Except for Ruby, which I tested locally because Godbolt doesn't permit passing command-line arguments to ruby. There's a box for it, but it gets parsed as a filename.) The characters I tested were é and 𐐀, and I only tried the latest x86_64/amd64 version of the compiler/interpreter if there were multiple versions to choose from.)

  • Unicode provides a recommendation for identifier syntax in Annex 31, defining the properties XID_Start and XID_Continue (and also ID_Start and ID_Continue, but these seem to be less used).

  • The C standards are paywalled, but according to cppreference.com, from C99 on, identifiers can contain \u and \U escape sequences, and implementations may accept actual Unicode characters. That lasts until the current draft version ("C23", although it isn't