Skip to content

Instantly share code, notes, and snippets.

Timothy Baldridge halgari

Block or report user

Report or block halgari

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View amusing.txt
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
View gist:78a0a828339f1230d2d83865ae73d659
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
View truffle-in-clojure.clj
(ns morel.core
(:import (com.oracle.truffle.api.nodes RootNode NodeInfo Node$Child))
(:require [clojure.interop :refer [defclass]]
[clojure.reflect :as reflect]))
(defclass
^{NodeInfo {:language "SL"
:description "The root of all SL execution trees"}}
SLRootNode [language
frame-descriptor
View Wabbajack-opt-out-of-modification-plan.md

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

@halgari
halgari / gist:f431b2d1094e4ec1e933969969489854
Last active Aug 29, 2019
What I want from a Type System
View gist:f431b2d1094e4ec1e933969969489854
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here
is a short list of what I would need from a type system for it to be truely useful to me:
1) Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
(assoc person :full-name (str (:first-name person)
(:second-name person))))
And have the compiler know that whatever type required and produced from this function was acceptible as long as the
View gist:a874b5e8e281c3e4afe51c0249b31811
(defn unordered-pmap [threads f in-c out-c]
(let [remain (atom threads)]
(dotimes [x threads]
(go-loop []
(if-some [v (<! in-c)]
(do (>! out-c (f v))
(recur))
View gist:c17f378718cbd2fd82324002133ef678

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

View gist:9885b337ca0199dd8cc12d7ecae361c1
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
--------------
(defn -main []
@halgari
halgari / gist:7160778
Created Oct 25, 2013
Using core.logic to query custom data sources.
View gist:7160778
(ns extend-core-logic.core
(:require [clojure.core.logic :refer :all]
[clojure.core.logic.protocols :refer [walk]]
[clojure.java.io :as jio]
[clojure.string :as string])
(:import [java.io BufferedReader StringReader]))
;; from: http://federalgovernmentzipcodes.us/
(defn load-db []
(let [data (java.io.BufferedReader. (java.io.StringReader. (slurp "/Users/tim/Downloads/free-zipcode-database.csv")))
View gist:5d7780e6f068ae217bb2
Code:
(ns vararg-bench.core
(:require [criterium.core :refer [quick-bench]])
(:gen-class))
(defn varargs [arg1 & [arg2 arg3]]
42)
You can’t perform that action at this time.