Source for this comparison of C and ClojureScript perf.
C source:
#include <stdio.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
int main() {
library transducers; | |
import 'dart:async'; | |
reduce(coll, Function fn, init) { | |
// Reduce function for Iterable. | |
if (coll is Iterable) { | |
var result = init; | |
final iterator = coll.iterator; | |
while (iterator.moveNext()) { |
Source for this comparison of C and ClojureScript perf.
C source:
#include <stdio.h>
#include <mach/mach.h>
#include <mach/mach_time.h>
int main() {
Hi everyone
It's not often that we email our members, so please bear with me and read this to the end.
Recent events in the wider tech community, and reactions within the Software Craftsmanship community, have prompted wider discussions about the inclusiveness of the community, and I've decided to make some small but important changes to our local chapter.
const { evalString } = require("@borkdude/sci"); | |
let printlnArgs = []; | |
function println(...args) { | |
printlnArgs.push(args.map(arg => arg.toString()).join(" ")); | |
} | |
exports.evalClojureExpr = (req, res) => { | |
const { text } = req.body; |
let audioContext | |
export function play (url) { | |
const AudioContext = window.AudioContext || window.webkitAudioContext | |
if (!audioContext) audioContext = new AudioContext() | |
const request = new window.XMLHttpRequest() | |
request.open('GET', url, true) | |
request.responseType = 'arraybuffer' | |
request.addEventListener('load', function (e) { | |
const source = audioContext.createBufferSource() | |
source.buffer = audioContext.createBuffer(request.response, false) |
Portfolio Selection, Markowitz
Volatility Smile, Derman
Adaptive Markets, Lo
Python for Finance, Hilpisch
Advances in Financial ML, de Prado
Listed Vol & Variance Derivatives, Hilpisch
Artificial Intelligence in Finance, Hilpisch
Diary of a Professional Commodity Trader, Brandt
Market Timing with Moving Averages, Zakamulin
// Inspired by http://kparc.com/b/c.h | |
// See also https://chat.stackexchange.com/transcript/message/51402407#51402407 | |
const x="x",y="y" | |
// Function makers | |
function fn() {return new Function(...arguments)} | |
function f0(b) {return fn(b)} | |
function f1(b) {return fn(x,b)} | |
function f2(b) {return fn(x,y,b)} |
#!/usr/bin/python3 | |
# Solution to the challenge at https://gist.github.com/ehmo/7f515ac6461c1c4d3e5a74f12e6eb5ea | |
# Sample solution: https://twitter.com/marcan42/status/1428933147660492800 | |
# | |
# Given an input base image, computes two derivative images that have different | |
# perceptual hashes, yet differ by only one pixel. | |
# | |
# Usage: hash_bisector.py <input.png> <output_a.png> <output_b.png> | |
# | |
# Licensed under the terms of the STRONGEST PUBLIC LICENSE, Draft 1: |
(ns aoc21-01 | |
(:require [clojure.string :as str])) | |
(def input (map parse-long (str/split-lines (slurp "input.txt")))) | |
(defn answer-01 [input] | |
(count (filter true? (map < input (rest input))))) | |
(def three-sliding-window | |
(map + input (next input) (nnext input))) |
; Learn Datalog Today (http://www.learndatalogtoday.org) is a great resource for | |
; reading but its interactive query interface is broken. Below is how we can | |
; load the same data into a Clojure REPL and play with it using DataScript. | |
; After running the code below, many/most/all? of the queries on Learn Datalog | |
; Today should be functional. | |
; | |
; Create a new lein project, add `[datascript "0.15.0"]` to `project.clj`'s | |
; `dependencies`, run `lein deps && lein repl` and copy-paste the following in | |
; chunks, inspecting the outputs as needed. |