https://databass.dev/links/1 -> https://issues.apache.org/jira/browse/CASSANDRA-2494
https://databass.dev/links/2 -> https://github.com/apache/cassandra/blob/7df67eff2d66dba4bed2b4f6aeabf05144d9b057/src/java/org/apache/cassandra/service/reads/repair/RowIteratorMergeListener.java
https://databass.dev/links/3 -> https://github.com/lasp-lang/partisan
https://databass.dev/links/4 -> https://github.com/helium/plumtree
https://databass.dev/links/5 -> https://dev.mysql.com/doc/internals/en/transaction-management.html
https://databass.dev/links/6 -> https://www.postgresql.org/docs/9.3/sql-prepare-transaction.html
https://databass.dev/links/7 -> https://docs.mongodb.com/v3.6/tutorial/perform-two-phase-commits
https://databass.dev/links/8 -> https://fauna.com
https://databass.dev/links/9 -> https://github.com/cockroachdb/cockroach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [channel (create) | |
incremented-values (map* inc channel) | |
decremented-values (map* dec channel)] | |
(consume incremented-values (fn [i] (println "Incremented value: " i))) | |
(consume decremented-values (fn [i] (println "Decremented value: " i))) | |
(accept channel 1) | |
(accept channel 2) | |
(accept channel 3) | |
(ms/flush channel)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package introspect; | |
import net.bytebuddy.instrumentation.method.bytecode.bind.annotation.AllArguments; | |
import net.bytebuddy.instrumentation.method.bytecode.bind.annotation.Origin; | |
import java.lang.reflect.Method; | |
public class LogInterceptor { | |
public static void log(@AllArguments Object[] allArguments, | |
@Origin Method method) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Concurrent.ParallelIO.Global (parallel) | |
import Control.Arrow (left) | |
data DbError = DbError | |
data Input = Input | |
data Result = Result | |
someOperation :: Either DbError [Input] | |
-> (Input -> IO (Either DbError Result)) | |
-> IO (Either DbError [Result]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Query = Query | |
data SomeObj = SomeObj | |
data IoOnlyObj = IoOnlyObj | |
data Err = Err | |
-- There's a decoder function that makes some object from String | |
decodeFn :: String -> Either Err SomeObj | |
decodeFn = undefined | |
-- There's a query, that runs against DB and returns array of strings |
First of all, sorry for the messy code (it was in a bad condition, and I've been commenting/uncommenting bunch of things to understand what's going on and where, only got time to fix it but not clearnup)
At first, I've started getting
Stack space overflow: current size 8388608 bytes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; "Normal" operation order | |
(->> [1 2 3] | |
(map inc) | |
(map #(* 2 %) | |
(reduce +)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn almost= | |
"Non-strict equality" | |
[wat center tolerance] | |
(and (>= wat (- center tolerance)) | |
(<= wat (+ center tolerance)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn max-from-list | |
"Get the maximum from list using recursion" | |
[[head & tail]] | |
(if (empty? tail) | |
head | |
(let [max-in-tail (max-from-list tail)] | |
(if (> head max-in-tail) | |
head | |
max-in-tail)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
res = `lein do pom, jar` | |
jar = res.split("\n").last.gsub("Created ", "") | |
puts "Gonna deploy jar: #{jar}" | |
exec "scp pom.xml #{jar} [email protected]:" |
NewerOlder