Skip to content

Instantly share code, notes, and snippets.

(defmacro persist-scope
"local scope -> atom"
[a]
`(do ~@(map (fn [v] `(swap! ~a assoc (keyword '~v) ~v))
(keys (cond-> &env (contains? &env :locals) :locals)))))
(def scope-atom (atom {}))
(let [foo 1] (persist-scope scope-atom))
@CumpsD
CumpsD / dontfeedthebeast.md
Created February 11, 2020 15:55 — forked from anonymous/dontfeedthebeast.md
Don’t Feed the Beast – the Great Recruitment Agency Infestation

Don’t Feed the Beast – the Great Recruitment Agency Infestation

“Don’t move to that London” warned my northern grandfather once. “It’s full of spivs”.

The Oxford Dictionary (somewhat chauvinistically) defines a spiv as:

A man, typically a flashy dresser, who makes a living by disreputable dealings

“But I work in IT” I told him. “engineers aren’t like that”.

React Native + macOS + Clojurescript

image

Project Catalyst

Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.

This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).

@schmee
schmee / assembly.log
Created August 6, 2019 18:53
Vector API in Clojure!
vector_clj/core$i256_add.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; [0x000000011f8acdc0, 0x000000011f8ad058] 664 bytes
[Entry Point]
[Constants]
# {method} {0x000000013253d3b8} 'invoke' '(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;' in 'vector_clj/core$i256_add'
# this: rsi:rsi = 'vector_clj/core$i256_add'
# parm0: rdx:rdx = 'java/lang/Object'
# parm1: rcx:rcx = 'java/lang/Object'
# [sp+0x30] (sp of caller)
.....
0x000000011f8acec3: prefetchw BYTE PTR [r10+0x180]

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@iosecure
iosecure / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Last active April 4, 2024 23:50
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

@eliangcs
eliangcs / http-prompt-story.md
Last active June 3, 2020 06:49
How I created HTTP Prompt and got 5000+ stars on GitHub

How I Created HTTP Prompt and Got 5000+ Stars on GitHub

Two months ago, I published an open source project, which went viral by gaining 1200+ stars in the first 24 hours. As of this writing, it has attracted 5000+ stars. The project is called HTTP Prompt:

https://github.com/eliangcs/http-prompt

Here I want to share its development story.

It all began with Vertica. Not long ago, I used Vertica every day for my work. Vertica is a powerful database, but the official client (vsql) is not powerful at all. The GUI alternative, DbVisualizer, is bad as well.

@Deraen
Deraen / spec-coercion.clj
Created June 14, 2016 15:47
Clojure.spec coercion test
(ns spec-test.core
(:require [clojure.spec :as s]))
(defn x-integer? [x]
(if (integer? x)
x
(if (string? x)
(try
(integer/parseint x)
(catch exception e
@smarr
smarr / truffle-material.md
Last active March 16, 2023 14:06
Truffle: Languages and Material
@bricker
bricker / amznymous.md
Last active April 23, 2024 11:14
An Amazon Programmer's Perspective (http://pastebin.com/BjD84BQ3)

Originally posted at http://pastebin.com/BjD84BQ3

Trigger warning: mention of suicidal ideation

tl;dr: I burned out as a developer at Amazon at the end of my second year. I’ve since found a healthy and sustainable work-life balance and enjoy work again. I write this to A) raise awareness, especially for new-hires and their families, and B) help give hope and advice to people going through the same at Amazon or other companies.

Hello, world

There’s been no shortage of anecdotes, opinions, and rebuttals regarding Amazon’s corporate culture as of late. I write this not to capitalize on the latest news-feed fad, but to share what I had already written and promptly deleted. I didn’t think anyone would want to hear my story, but it’s apparent people are going through a similar experience and don’t have a voice.

I’m a Software Development Engineer II at Amazon; SDE II basically means a software developer with at least 2–3 years of industry experience. I started at Amazon as an SDE I.