Skip to content

Instantly share code, notes, and snippets.

View burinc's full-sized avatar

Burin burinc

View GitHub Profile
@matthewdowney
matthewdowney / deploy.clj
Created March 11, 2023 01:19
Using the AWS CDK from Clojure
(ns deploy
(:require [clojure.java.io :as io])
(:import (software.amazon.awscdk App CfnOutput$Builder Stack)
(software.amazon.awscdk.services.apigatewayv2.alpha AddRoutesOptions HttpApi$Builder HttpMethod)
(software.amazon.awscdk.services.apigatewayv2.authorizers.alpha HttpIamAuthorizer)
(software.amazon.awscdk.services.apigatewayv2.integrations.alpha HttpAlbIntegration)
(software.amazon.awscdk.services.ec2 Vpc$Builder)
(software.amazon.awscdk.services.ecs Cluster$Builder ContainerImage)
(software.amazon.awscdk.services.ecs.patterns ApplicationLoadBalancedFargateService$Builder ApplicationLoadBalancedTaskImageOptions)
(software.amazon.awscdk.services.iam AnyPrincipal)
@Gavinok
Gavinok / chatgpt.el
Last active June 4, 2023 22:22
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,
@ssrihari
ssrihari / clojure-learning-list.md
Last active July 5, 2024 10:23
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language

Why not: from Common Lisp to Julia

This article is a response to mfiano’s From Common Lisp to Julia which might also convey some developments happening in Common Lisp. I do not intend to suggest that someone coming from a Matlab, R, or Python background should pickup Common Lisp. Julia is a reasonably good language when compared to what it intends to replace. You should pickup Common Lisp only if you are interested in programming in general, not limited to scientific computing, and envision yourself writing code for the rest of your life. It will expand your mind to what is possible, and that goes beyond the macro system. Along the same lines though, you should also pickup C, Haskell, Forth, and perhaps a few other languages that have some noteworthy things to teach, and that I too have been to lazy to learn.

/I also do not intend to offend anyone. I’m okay with criticizing Common Lisp (I myself have done it below!), but I want t

@RutledgePaulV
RutledgePaulV / bktree.clj
Last active August 1, 2022 14:35
bktree.clj
(defn create-index [distance-fn]
(with-meta {} {:distance-fn distance-fn}))
(defn index->root [index]
(-> index meta :root))
(defn index->distance-fn [index]
(-> index meta :distance-fn))
(ql:quickload '(:cl-who :clog :cl-markdown))
(defpackage :clog-learn
(:use :cl :clog #:clog-gui)
(:import-from :cl-who :with-html-output
:with-html-output-to-string :htm :str :fmt)
(:export :start))
(in-package :clog-learn)
@markerikson
markerikson / job-search-questions.md
Last active June 16, 2024 20:11
Assorted questions to ask companies in interviews

Questions

Company

  • company location / remote?
  • what project management method?
  • good and bad company culture?
  • performance reviews?
  • what's the path to profitability?
@Lambeaux
Lambeaux / user.cljs
Created October 11, 2021 20:02
Toggle to keep NodeJS ClojureScript REPL from crashing on uncaught errors
(defn exception-handler [err]
(binding [*print-fn* *print-err-fn*]
(println "An error occurred that otherwise would have crashed the Node process:")
(println err)))
(defn handle-all []
(.on js/process "uncaughtException" exception-handler))
(defn handle-none []
(.removeListener js/process "uncaughtException" exception-handler))
@didibus
didibus / clojure-right-tool.md
Last active June 1, 2024 14:06
When is Clojure "the right tool for the job"?

My answer to: https://www.reddit.com/r/Clojure/comments/pcwypb/us_engineers_love_to_say_the_right_tool_for_the/ which asked to know when and at what is Clojure "the right tool for the job"?

My take is that in general, the right tool for the job actually doesn't matter that much when it comes to programming language.

There are only a few cases where the options of tools that can do a sufficiently good job at the task become limited.

That's why they are called: General-purpose programming languages, because they can be used generally for most use cases without issues.

Let's look at some of the dimensions that make a difference and what I think of Clojure for them:

@adam-james-v
adam-james-v / vidwiz.clj
Last active January 22, 2023 09:42
Clojure/babashka script to help automate some of my video editing pipeline
#!/usr/bin/env bb
(ns vidwiz.main
"This is a prototype script for automating a portion of my video editing using ffmpeg."
(:require [clojure.java.shell :refer [sh]]
[clojure.string :as st]
[cheshire.core :refer [parse-string]]))
;; util
(defn get-extension