Skip to content

Instantly share code, notes, and snippets.

View ampersanda's full-sized avatar
❤️
.clj

Lucky Pradana ampersanda

❤️
.clj
View GitHub Profile
@roman01la
roman01la / clojurescript-repl-workflow.md
Last active October 22, 2022 12:07
ClojureScript REPL Workflow

ClojureScript REPL Workflow

Short write up on using REPL when developing UIs in ClojureScript.

Hot-reload on save or Eval in REPL?

Everyone's standard approach to hot-reloading is to use a tool (Figwheel or shadow-cljs) that reloads changed namespaces automatically. This works really well: you change the code, the tool picks up changed files, compiles namespaces and dependants, notifies REPL client which then pulls in compiled changes, and re-runs a function that re-renders UI.

The other approach is to use ClojureScript's REPL directly and rely only on eval from the editor. This more or less matches Clojure style workflow. This approach might be useful when you don't want tools overhead or hot-reloading becomes slow for you or you just used to this style of interactions. Also changing code doesn't always mean that you want to reload all the changes. On the other hand it is very easy to change a couple of top-level forms and forget to eval one of them.

@slightfoot
slightfoot / media_query_extension.dart
Last active July 29, 2021 13:32
Media Query Extension - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@cldwalker
cldwalker / spike-day-02-03-20.md
Last active December 29, 2023 04:52
GraalVM dive in Clojure at work

Spike

I looked into the state of GraalVM and Clojure and wrote some small work-related scripts.

GraalVM Build Tools

@yogthos
yogthos / clojure-beginner.md
Last active April 29, 2024 10:56
Clojure beginner resources

Introductory resources

(ns openscad-experiments.helpers
(:require [scad-clj.model :as m]
[scad-clj.scad :refer [write-scad]]))
(defn render [object]
(spit "render.scad" (write-scad object)))
(defn y-split [obj]
(let [box (m/cube 10 10 10)
holed-obj (m/difference obj (m/scale [1.005 1.2 1.005] box))
@athos
athos / deps.edn
Last active June 21, 2023 00:15
Try on your terminal `clojure -Sdeps '{:deps {hello-clojure/hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :git/sha "099bdf7d565b2c35c1df601abf58514cc5276237"}}}' -M -m hello-clojure`
{:paths ["."]
:deps {clansi/clansi {:mvn/version "1.0.0"}}}