Skip to content

Instantly share code, notes, and snippets.

View halgari's full-sized avatar

Timothy Baldridge halgari

View GitHub Profile

Goal

To provide a method by which Wabajack can assist mod authors in maintaining creative control over their mods while still allowing for more rapid installation of mods

Current issues

  • Users can download a mod, change it and create an installer with Wabbajack that publishes these changes via binary patching this goes against usage restrictions for "no modifications of this mod are allowed".
  • Users can extract BSAs with Wabbajack, going against warnings for no BSA extraction
  • The nexus doesn't seem to provide a good way to track a modder's desire to not allow end users to modify their files
  • Wabbajack allows downloading from 3rd party sites that does not maintain author's rights. We currently have a "who cares" attitude, which isn't condusive to collaboration with the modding community. It would be good to improve this situation.

Plans for solving these issues

package main
import "fmt"
func main() {
fmt.Println("hello world")
}
--------------
(defn -main []
Code:
(ns vararg-bench.core
(:require [criterium.core :refer [quick-bench]])
(:gen-class))
(defn varargs [arg1 & [arg2 arg3]]
42)
(ns set-test
(:require [criterium.core :refer [bench quick-bench]])
(:import [clojure.lang IPersistentSet]))
(defn- bubble-max-key
"Move a maximal element of coll according to fn k (which returns a
number) to the front of coll."
[k coll]
(let [max (apply max-key k coll)]
(cons max (remove #(identical? max %) coll))))
(defn r-some?
"Super fast version of clojure.core/some that does minimal allocation"
[pred coll]
(reduce
(fn [acc v]
(if-let [val (pred coll)]
(reduced val)
acc))
false
enum FnNames {
PRINT,
ADD,
SOME_FN,
}
struct Fn {
enum FnNames name;
}
@halgari
halgari / gist:7028120
Last active January 31, 2018 12:32
Async Agents via core.async
(use 'clojure.core.async)
(defprotocol ISendable
(channel [this]))
(defn async-agent [state]
(let [c (chan Long/MAX_VALUE) ;; <<-- unbounded buffers are bad, but this matches agents
a (atom state)]
(go-loop []
(when-let [[f args] (<! c)]
(def ^:dynamic *counters*)
(defn new-counter [name]
"Creates a pair of LongAdders"
...)
(defn get-counter [name]
(if-let [ctr (get *counter* name]
ctr
;;;
(->> actors
(map (partial get-data server-pool))
(filter #(> (:age %) 42))
(map :name)
set)
(into #{}
@halgari
halgari / gist:4136116
Created November 23, 2012 15:26 — forked from AlexBaranosky/gist:4134522
doseq-indexed
;; Example:
;; (doseq-indexed idx [name names]
;; (println (str idx ". " name)
(defmacro doseq-indexed-functional [index-sym [item-sym coll] & body]
`(doseq [[~item-sym ~index-sym]
(map vector ~coll (range))]
~@body))