Skip to content

Instantly share code, notes, and snippets.

View halgari's full-sized avatar

Timothy Baldridge halgari

View GitHub Profile
(ns scratch)
(defn map [f]
(fn [xf]
(fn
([] (xf))
([acc] (xf acc))
([acc itm]
(xf acc (f itm))))))
We were keeping our eye on 1984. When the year came and the prophecy didn't, thoughtful Americans sang softly in praise of themselves. The roots of liberal democracy had held. Wherever else the terror had happened, we, at least, had not been visited by Orwellian nightmares.
But we had forgotten that alongside Orwell's dark vision, there was another - slightly older, slightly less well known, equally chilling: Aldous Huxley's Brave New World. Contrary to common belief even among the educated, Huxley and Orwell did not prophesy the same thing. Orwell warns that we will be overcome by an externally imposed oppression. But in Huxley's vision, no Big Brother is required to deprive people of their autonomy, maturity and history. As he saw it, people will come to love their oppression, to adore the technologies that undo their capacities to think.
What Orwell feared were those who would ban books. What Huxley feared was that there would be no reason to ban a book, for there would be no one who wanted to read one. O
We were keeping our eye on 1984. When the year came and the prophecy didn't, thoughtful Americans sang softly in praise of themselves. The roots of liberal democracy had held. Wherever else the terror had happened, we, at least, had not been visited by Orwellian nightmares.
But we had forgotten that alongside Orwell's dark vision, there was another - slightly older, slightly less well known, equally chilling: Aldous Huxley's Brave New World. Contrary to common belief even among the educated, Huxley and Orwell did not prophesy the same thing. Orwell warns that we will be overcome by an externally imposed oppression. But in Huxley's vision, no Big Brother is required to deprive people of their autonomy, maturity and history. As he saw it, people will come to love their oppression, to adore the technologies that undo their capacities to think.
What Orwell feared were those who would ban books. What Huxley feared was that there would be no reason to ban a book, for there would be no one who wanted to read one. O

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 []
@halgari
halgari / gist:c17f378718cbd2fd82324002133ef678
Created November 23, 2018 20:54
Contributing to Clojure

So you’d like to contribute to Clojure, great! Let’s talk about what that involves.

The first thing you’ll want to make sure is that your idea is valid, and that you won’t spend a ton of time working on something that won’t make into master. To do this, you should create a JIRA ticket. For example, let’s say we want to improve how core.async handles channel closing propagation. It’s not a super complex problem, but there are some design questions about which of the various semantics currently in place should be the default, and if some semantics should be configurable.

So start by making a JIRA ticket and stating what the problem is you’re trying to solve, what the possible options for solving the problem. Now hit save and wait for the ticket to be triaged. Alex Miller will take a look when he can, and that can take a few days to a few weeks, depending on the time of the year (he has other responsibilities). Alex may out-right reject the idea if he knows Rich would never approve the ticket, but otherwise h

(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
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;
}