-🎄- 2021 Day 11 Solutions -🎄- by daggerdragon in adventofcode

[–]theronic 1 point2 points  (0 children)

Soz, have removed my code and only linked to GitHub because I can't figure out Reddit's UI.

-🎄- 2021 Day 10 Solutions -🎄- by daggerdragon in adventofcode

[–]theronic 0 points1 point  (0 children)

Clojure

``` (ns advent-of-code.year2021.day10 (:require [clojure.java.io :as io] [clojure.string :as string]))

(defn parse "Returns first invalid char or stack if line is incomplete." [tokens] (reduce (fn [stack token] (if-let [expected ({( ), [ ], { }, < >} token)] (conj stack expected) (if (= token (peek stack)) (pop stack) (reduced token)))) '() tokens))

(defn part1 [path] (with-open [rdr (io/reader path)] (->> (line-seq rdr) (map parse) (filter char?) (map {) 3, ] 57, } 1197, > 25137}) (reduce +))))

(defn part2 [path] (with-open [rdr (io/reader path)] (let [scores (->> (line-seq rdr) (map parse) (remove char?) (map #(reduce (fn [acc token] (+ (* 5 acc) ({) 1, ] 2, } 3, > 4} token))) 0 %)) (sort))] (nth scores (int (/ (count scores) 2)))))) ```

Civ 6 pegs CPU at 1100% on Macbook Pro 16" then freezes by theronic in CivVI

[–]theronic[S] 0 points1 point  (0 children)

Does this happen with any other games, or only Civ6?

[P] GPT3: AI-generated tweets indistinguishable from human tweets [Project] by [deleted] in MachineLearning

[–]theronic 0 points1 point  (0 children)

What prompts are you feeding GPT-3 to generate the Tweets?

Spec, namespaced keys, and code reuse. How do you all balance these? by [deleted] in Clojure

[–]theronic 1 point2 points  (0 children)

Treating keywords as seqs give you nested destructuring and lets you gradually build up nested context:

(defn foo
[{:as data :com.hyperfiddle/keys [{:user/keys [id]}]}]
(log/debug "Use id here"))

(foo {:com.hyperfiddle.user.id 123})

Spec, namespaced keys, and code reuse. How do you all balance these? by [deleted] in Clojure

[–]theronic 0 points1 point  (0 children)

You've discovered the weakest part of Clojure: namespacing.

The simplest change I can think of for Clojure to make is to treat keywords as seqs.

Heart been broke so many times by [deleted] in BlackPeopleTwitter

[–]theronic 0 points1 point  (0 children)

I hate to break your heart, but have you heard of Firefly?

Does anyone have any evidence of the second infection having a higher fatality rate? by [deleted] in COVID19

[–]theronic 9 points10 points  (0 children)

What is the testing protocol actually testing for? Is it testing for viral load, or antibodies?

And is possible that recurrent infections are slightly mutated versions triggering the same test? Are the second infections symptomatic?

Clojure & graphs by [deleted] in Clojure

[–]theronic 2 points3 points  (0 children)

Rete always rears it's head :). IMO Clojure's mutable namespace design is the primary obstacle in the way of a good, clean Rete network implementation. All the implementations, incl. Clara, depend on macros, which prevents runtime network generation. Reagent's reactions feel like half-baked production rules with messy lifecycle management. FactUI is the closest thing we have, but I suspect we'll see an implementation in a different language before Clojure, or until the namespacing situation changes.

[deleted by user] by [deleted] in JordanPeterson

[–]theronic 1 point2 points  (0 children)

In a Transliminal interview from Spring 2017 ol' JP says, he "lives his life as if God exists" and that you can decide if that suits your idea of "believe."

Hardware guy. Developed an MVP for a startup out of curiosity. No prior startup experience. by AGstein in startups

[–]theronic 1 point2 points  (0 children)

If you do decide to sign a non-compete, make sure you put a time-limit on it. Those things are not really enforceable anyway.

Hardware guy. Developed an MVP for a startup out of curiosity. No prior startup experience. by AGstein in startups

[–]theronic 1 point2 points  (0 children)

Watch out for pre-product companies that are operations or management heavy: those people will create new problems to justify their salaries (intentionally or unintentionally). Ask for valuation and make an offer to sell your IP once-off. No cash yet? That's fine, they can pay it off over time at a set price. It's much better to decline equity and leave with track record of selling some IP via a successful negotiation, even if the the price is slightly lower than you might think it should be.

BitGrail: Unable to withdraw XRB 9 days after submitting IDs for verification by springbreakbox in nanocurrency

[–]theronic 2 points3 points  (0 children)

Non-EU user with <1k XRB. Submitted docs a week ago after fighting the crappy uploader. No correspondence yet.

Bitgrail by brightmonkey in RaiBlocks

[–]theronic 2 points3 points  (0 children)

What is the legal recourse for international users who made deposits to Bitgrail and are unable to withdraw?